summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/simplify-libcalls-aapcs.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/simplify-libcalls-aapcs.ll b/llvm/test/Transforms/InstCombine/simplify-libcalls-aapcs.ll
new file mode 100644
index 00000000000..b2bd1b35ded
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/simplify-libcalls-aapcs.ll
@@ -0,0 +1,23 @@
+; RUN: opt -S < %s -instcombine | FileCheck %s
+
+; When simplify-libcall change an intrinsic call to a call to a library
+; routine, it needs to set the proper calling convention for callers
+; which use ARM target specific calling conventions.
+; rdar://16261856
+
+target triple = "thumbv7-apple-ios7"
+
+; Function Attrs: nounwind ssp
+define arm_aapcs_vfpcc double @t(double %x) #0 {
+entry:
+; CHECK-LABEL: @t
+; CHECK: call arm_aapcs_vfpcc double @__exp10
+ %0 = call double @llvm.pow.f64(double 1.000000e+01, double %x)
+ ret double %0
+}
+
+; Function Attrs: nounwind readnone
+declare double @llvm.pow.f64(double, double) #1
+
+attributes #0 = { nounwind ssp }
+attributes #1 = { nounwind readnone }
OpenPOWER on IntegriCloud