summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/vector_gep.ll
diff options
context:
space:
mode:
authorElena Demikhovsky <elena.demikhovsky@intel.com>2016-05-15 12:30:25 +0000
committerElena Demikhovsky <elena.demikhovsky@intel.com>2016-05-15 12:30:25 +0000
commitee004bc0a2cbbb31461efb78c25f57a23bb1673b (patch)
treef16d3faf24c9a58e976572591673e92fb86c93b4 /llvm/test/Transforms/InstSimplify/vector_gep.ll
parente62c54375d2e75acaaa1394de99f4f61462e7530 (diff)
downloadbcm5719-llvm-ee004bc0a2cbbb31461efb78c25f57a23bb1673b.tar.gz
bcm5719-llvm-ee004bc0a2cbbb31461efb78c25f57a23bb1673b.zip
Vector GEP - fixed a crash on InstSimplify Pass.
Vector GEP with mixed (vector and scalar) indices failed on the InstSimplify Pass when all indices are constants. Differential revision http://reviews.llvm.org/D20149 llvm-svn: 269590
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/vector_gep.ll')
-rw-r--r--llvm/test/Transforms/InstSimplify/vector_gep.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/vector_gep.ll b/llvm/test/Transforms/InstSimplify/vector_gep.ll
index 5c3062047c3..54887e99ee3 100644
--- a/llvm/test/Transforms/InstSimplify/vector_gep.ll
+++ b/llvm/test/Transforms/InstSimplify/vector_gep.ll
@@ -53,3 +53,12 @@ define <4 x i8*> @test5() {
; CHECK-LABEL: @test5
; CHECK-NEXT: ret <4 x i8*> getelementptr (i8, <4 x i8*> <i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 2 to i8*), i8* inttoptr (i64 3 to i8*), i8* inttoptr (i64 4 to i8*)>, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
}
+
+@v = global [24 x [42 x [3 x i32]]] zeroinitializer, align 16
+
+define <16 x i32*> @test6() {
+; CHECK-LABEL: @test6
+; CHECK-NEXT: ret <16 x i32*> getelementptr ([24 x [42 x [3 x i32]]], [24 x [42 x [3 x i32]]]* @v, <16 x i64> zeroinitializer, <16 x i64> zeroinitializer, <16 x i64> <i64 0, i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15>, <16 x i64> zeroinitializer)
+ %VectorGep = getelementptr [24 x [42 x [3 x i32]]], [24 x [42 x [3 x i32]]]* @v, i64 0, i64 0, <16 x i64> <i64 0, i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15>, i64 0
+ ret <16 x i32*> %VectorGep
+} \ No newline at end of file
OpenPOWER on IntegriCloud