1 ; RUN: llc < %s -mtriple=arm64-apple-ios7 | FileCheck %s --check-prefix CHECK-IOS
2 ; RUN: llc < %s -mtriple=arm64-linux-gnu | FileCheck %s --check-prefix CHECK-LINUX
4 ; Combine sin / cos into a single call.
7 define float @test1(float %x) nounwind {
9 ; CHECK-IOS-LABEL: test1:
10 ; CHECK-IOS: bl ___sincosf_stret
11 ; CHECK-IOS: fadd s0, s0, s1
13 ; CHECK-LINUX-LABEL: test1:
14 ; CHECK-LINUX: bl sinf
15 ; CHECK-LINUX: bl cosf
17 %call = tail call float @sinf(float %x) nounwind readnone
18 %call1 = tail call float @cosf(float %x) nounwind readnone
19 %add = fadd float %call, %call1
23 define double @test2(double %x) nounwind {
25 ; CHECK-IOS-LABEL: test2:
26 ; CHECK-IOS: bl ___sincos_stret
27 ; CHECK-IOS: fadd d0, d0, d1
29 ; CHECK-LINUX-LABEL: test2:
33 %call = tail call double @sin(double %x) nounwind readnone
34 %call1 = tail call double @cos(double %x) nounwind readnone
35 %add = fadd double %call, %call1
39 declare float @sinf(float) readonly
40 declare double @sin(double) readonly
41 declare float @cosf(float) readonly
42 declare double @cos(double) readonly