summaryrefslogtreecommitdiff
path: root/test/Transforms/ConstProp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-12-03 00:00:03 +0000
committerChad Rosier <mcrosier@apple.com>2011-12-03 00:00:03 +0000
commit24fbf2bf161b20b13d0a218345bdcd092bdd56f8 (patch)
treed9e9e61b4e961c56b6bfdbcf82993f4b9fb7bda9 /test/Transforms/ConstProp
parent587f5062b9e4532c4f464942e593cb87c58ac153 (diff)
downloadllvm-24fbf2bf161b20b13d0a218345bdcd092bdd56f8.tar.gz
llvm-24fbf2bf161b20b13d0a218345bdcd092bdd56f8.tar.bz2
llvm-24fbf2bf161b20b13d0a218345bdcd092bdd56f8.tar.xz
Add support for constant folding the pow intrinsic.
rdar://10514247 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ConstProp')
-rw-r--r--test/Transforms/ConstProp/calls.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/calls.ll b/test/Transforms/ConstProp/calls.ll
index b3ea122406..7a405a539c 100644
--- a/test/Transforms/ConstProp/calls.ll
+++ b/test/Transforms/ConstProp/calls.ll
@@ -61,6 +61,15 @@ declare i32 @llvm.x86.sse2.cvttsd2si(<2 x double>) nounwind readnone
declare i64 @llvm.x86.sse2.cvtsd2si64(<2 x double>) nounwind readnone
declare i64 @llvm.x86.sse2.cvttsd2si64(<2 x double>) nounwind readnone
+define double @test_intrinsic_pow() nounwind uwtable ssp {
+entry:
+; CHECK: @test_intrinsic_pow
+; CHECK-NOT: call
+ %0 = call double @llvm.pow.f64(double 1.500000e+00, double 3.000000e+00)
+ ret double %0
+}
+declare double @llvm.pow.f64(double, double) nounwind readonly
+
; Shouldn't fold because of -fno-builtin
define double @sin_() nounwind uwtable ssp {
; FNOBUILTIN: @sin_