From ee004bc0a2cbbb31461efb78c25f57a23bb1673b Mon Sep 17 00:00:00 2001 From: Elena Demikhovsky Date: Sun, 15 May 2016 12:30:25 +0000 Subject: 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 --- llvm/test/Transforms/InstSimplify/vector_gep.ll | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'llvm/test/Transforms') 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*> , <4 x i32> ) } + +@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> , <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 + ret <16 x i32*> %VectorGep +} \ No newline at end of file -- cgit v1.2.3