aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/v7k-sincos.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ARM/v7k-sincos.ll')
-rw-r--r--test/CodeGen/ARM/v7k-sincos.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/v7k-sincos.ll b/test/CodeGen/ARM/v7k-sincos.ll
new file mode 100644
index 0000000000000..b89d4dc8120bf
--- /dev/null
+++ b/test/CodeGen/ARM/v7k-sincos.ll
@@ -0,0 +1,16 @@
+; RUN: llc -mtriple=thumbv7k-apple-watchos2.0 -o - %s | FileCheck %s
+
+declare double @sin(double) nounwind readnone
+declare double @cos(double) nounwind readnone
+
+define double @test_stret(double %in) {
+; CHECK-LABEL: test_stret:
+; CHECK: blx ___sincos_stret
+; CHECK-NOT: ldr
+; CHECK: vadd.f64 d0, d0, d1
+
+ %sin = call double @sin(double %in)
+ %cos = call double @cos(double %in)
+ %sum = fadd double %sin, %cos
+ ret double %sum
+}