aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ConstProp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-05-22 22:22:35 +0000
committerChris Lattner <sabre@nondot.org>2011-05-22 22:22:35 +0000
commit805fa97a0f5ff61624855da37d4881708fb8f0fb (patch)
tree50dbb9ec1bbd4c44e392db4e6746a6a34911c528 /test/Transforms/ConstProp
parent1ec11fb8b502971071a57b8b2de129f86bd41de0 (diff)
downloadexternal_llvm-805fa97a0f5ff61624855da37d4881708fb8f0fb.zip
external_llvm-805fa97a0f5ff61624855da37d4881708fb8f0fb.tar.gz
external_llvm-805fa97a0f5ff61624855da37d4881708fb8f0fb.tar.bz2
implement PR9315, constant folding exp2 in terms of pow (since hosts without
C99 runtimes don't have exp2). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ConstProp')
-rw-r--r--test/Transforms/ConstProp/calls.ll7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Transforms/ConstProp/calls.ll b/test/Transforms/ConstProp/calls.ll
index 82d7324..3b6010a 100644
--- a/test/Transforms/ConstProp/calls.ll
+++ b/test/Transforms/ConstProp/calls.ll
@@ -7,6 +7,7 @@ declare double @sin(double)
declare double @tan(double)
declare double @sqrt(double)
+declare double @exp2(double)
define double @T() {
; CHECK: @T
@@ -19,7 +20,11 @@ define double @T() {
%b = fadd double %a, %C
%D = call double @sqrt(double 4.000000e+00)
%c = fadd double %b, %D
- ret double %c
+
+ ; PR9315
+ %E = call double @exp2(double 4.0)
+ %d = fadd double %c, %E
+ ret double %d
}
define i1 @test_sse_cvt() nounwind readnone {