1 ; Make sure this testcase codegens to the sin and cos instructions, not calls
2 ; RUN: llvm-as < %s | \
3 ; RUN: llc -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
4 ; RUN: grep sin\$ | count 3
5 ; RUN: llvm-as < %s | \
6 ; RUN: llc -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | \
7 ; RUN: grep cos\$ | count 3
9 declare float @sinf(float)
11 declare double @sin(double)
13 declare x86_fp80 @sinl(x86_fp80)
15 define float @test1(float %X) {
16 %Y = call float @sinf(float %X)
20 define double @test2(double %X) {
21 %Y = call double @sin(double %X)
25 define x86_fp80 @test3(x86_fp80 %X) {
26 %Y = call x86_fp80 @sinl(x86_fp80 %X)
30 declare float @cosf(float)
32 declare double @cos(double)
34 declare x86_fp80 @cosl(x86_fp80)
36 define float @test4(float %X) {
37 %Y = call float @cosf(float %X)
41 define double @test5(double %X) {
42 %Y = call double @cos(double %X)
46 define x86_fp80 @test6(x86_fp80 %X) {
47 %Y = call x86_fp80 @cosl(x86_fp80 %X)