blob: f17e33ae3e8e3ca835517600dbbc273060393b38 [file] [log] [blame]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel=0 | FileCheck %s --check-prefixes=X86,SDAG-X86
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel=0 | FileCheck %s --check-prefixes=X64,SDAG-X64
; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefixes=X86,GISEL-X86
; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefixes=X64,GISEL-X64
define float @use_asinf32(float %a) nounwind {
; X86-LABEL: use_asinf32:
; X86: # %bb.0:
; X86-NEXT: subl $12, %esp
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: fstps (%esp)
; X86-NEXT: calll asinf
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: use_asinf32:
; X64: # %bb.0:
; X64-NEXT: jmp asinf@PLT # TAILCALL
%x = call float @llvm.asin.f32(float %a)
ret float %x
}
define double @use_asinf64(double %a) nounwind {
; X86-LABEL: use_asinf64:
; X86: # %bb.0:
; X86-NEXT: subl $12, %esp
; X86-NEXT: fldl {{[0-9]+}}(%esp)
; X86-NEXT: fstpl (%esp)
; X86-NEXT: calll asin
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: use_asinf64:
; X64: # %bb.0:
; X64-NEXT: jmp asin@PLT # TAILCALL
%x = call double @llvm.asin.f64(double %a)
ret double %x
}
define x86_fp80 @use_asinf80(x86_fp80 %a) nounwind {
; X86-LABEL: use_asinf80:
; X86: # %bb.0:
; X86-NEXT: subl $12, %esp
; X86-NEXT: fldt {{[0-9]+}}(%esp)
; X86-NEXT: fstpt (%esp)
; X86-NEXT: calll asinl
; X86-NEXT: addl $12, %esp
; X86-NEXT: retl
;
; X64-LABEL: use_asinf80:
; X64: # %bb.0:
; X64-NEXT: subq $24, %rsp
; X64-NEXT: fldt {{[0-9]+}}(%rsp)
; X64-NEXT: fstpt (%rsp)
; X64-NEXT: callq asinl@PLT
; X64-NEXT: addq $24, %rsp
; X64-NEXT: retq
%x = call x86_fp80 @llvm.asin.f80(x86_fp80 %a)
ret x86_fp80 %x
}
declare float @llvm.asin.f32(float)
declare double @llvm.asin.f64(double)
declare x86_fp80 @llvm.asin.f80(x86_fp80)
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; GISEL-X64: {{.*}}
; GISEL-X86: {{.*}}
; SDAG-X64: {{.*}}
; SDAG-X86: {{.*}}