1 ; RUN: llc < %s -mtriple=x86_64-apple-macosx10.9.0 -mcpu=core2 | FileCheck %s --check-prefix=SINCOS
2 ; RUN: llc < %s -mtriple=x86_64-apple-macosx10.8.0 -mcpu=core2 | FileCheck %s --check-prefix=NOOPT
4 ; Combine sin / cos into a single call.
7 define float @test1(float %x) nounwind {
10 ; SINCOS: callq ___sincosf_stret
11 ; SINCOS: addss %xmm1, %xmm0
16 %call = tail call float @sinf(float %x) nounwind readnone
17 %call1 = tail call float @cosf(float %x) nounwind readnone
18 %add = fadd float %call, %call1
22 define double @test2(double %x) nounwind {
25 ; SINCOS: callq ___sincos_stret
26 ; SINCOS: addsd %xmm1, %xmm0
31 %call = tail call double @sin(double %x) nounwind readnone
32 %call1 = tail call double @cos(double %x) nounwind readnone
33 %add = fadd double %call, %call1
37 declare float @sinf(float) readonly
38 declare double @sin(double) readonly
39 declare float @cosf(float) readonly
40 declare double @cos(double) readonly