aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/ConstProp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-04 06:29:29 +0000
committerChris Lattner <sabre@nondot.org>2009-12-04 06:29:29 +0000
commit44a7a380aa9fbb303f57f4f8269062b7b56be980 (patch)
tree844e2b9e276bd18c2aa3d7ea9c99dfd4ab20a45d /test/Transforms/ConstProp
parentbbf9a5845acf35167211128b1b4b1b81d38ccb31 (diff)
Fix PR5551 by not ignoring the top level constantexpr when
folding a load from constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90545 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ConstProp')
-rw-r--r--test/Transforms/ConstProp/loads.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/loads.ll b/test/Transforms/ConstProp/loads.ll
index edd26b8772..9151d256b0 100644
--- a/test/Transforms/ConstProp/loads.ll
+++ b/test/Transforms/ConstProp/loads.ll
@@ -101,3 +101,12 @@ entry:
}
+; PR5551
+@test12g = private constant [6 x i8] c"a\00b\00\00\00"
+
+define i16 @test12() {
+ %a = load i16* getelementptr inbounds ([3 x i16]* bitcast ([6 x i8]* @test12g to [3 x i16]*), i32 0, i64 1)
+ ret i16 %a
+; CHECK: @test12
+; CHECK: ret i16 98
+}