1 ; Make sure this testcase codegens to the sin and cos instructions, not calls
2 ; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | FileCheck %s --check-prefix=SIN
3 ; RUN: llc < %s -march=x86 -mattr=-sse,-sse2,-sse3 -enable-unsafe-fp-math | FileCheck %s --check-prefix=COS
5 declare float @sinf(float) readonly
7 declare double @sin(double) readonly
9 declare x86_fp80 @sinl(x86_fp80) readonly
12 define float @test1(float %X) {
13 %Y = call float @sinf(float %X) readonly
16 ; SIN: {{^[ \t]*fsin$}}
21 define double @test2(double %X) {
22 %Y = call double @sin(double %X) readonly
25 ; SIN: {{^[ \t]*fsin$}}
30 define x86_fp80 @test3(x86_fp80 %X) {
31 %Y = call x86_fp80 @sinl(x86_fp80 %X) readonly
34 ; SIN: {{^[ \t]*fsin$}}
38 declare float @cosf(float) readonly
40 declare double @cos(double) readonly
42 declare x86_fp80 @cosl(x86_fp80) readonly
47 define float @test4(float %X) {
48 %Y = call float @cosf(float %X) readonly
51 ; COS: {{^[ \t]*fcos}}
53 define double @test5(double %X) {
54 %Y = call double @cos(double %X) readonly
57 ; COS: {{^[ \t]*fcos}}
59 define x86_fp80 @test6(x86_fp80 %X) {
60 %Y = call x86_fp80 @cosl(x86_fp80 %X) readonly
63 ; COS: {{^[ \t]*fcos}}