Add correct NEON encodings for the "multiple single elements" form of vld.
[oota-llvm.git] / test / Transforms / InstCombine / getelementptr.ll
index 285e0ba602f42adaf1886a84c3f78cfe37067d16..9e8547b684b1fac1890dc5d11033637b05035bdb 100644 (file)
@@ -246,7 +246,7 @@ bc0:
         store i32 0, i32* %tmp53
         ret void
 ; CHECK: @test24
-; CHECK: store i32 0, i32* getelementptr (%"java/lang/StringBuffer"* null, i32 0, i32 1)
+; CHECK: store i32 0, i32* getelementptr (%"java/lang/StringBuffer"* null, i64 0, i32 1)
 }
 
 define void @test25() {
@@ -445,7 +445,7 @@ define i32 @test35() nounwind {
              i8* getelementptr (%t1* bitcast (%t0* @s to %t1*), i32 0, i32 1, i32 0)) nounwind
   ret i32 0
 ; CHECK: @test35
-; CHECK: call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @"\01LC8", i64 0, i64 0), i8* bitcast (i8** getelementptr (%t1* bitcast (%t0* @s to %t1*), i64 1, i32 0) to i8*)) nounwind
+; CHECK: call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([17 x i8]* @"\01LC8", i64 0, i64 0), i8* getelementptr inbounds (%t0* @s, i64 0, i32 1, i64 0)) nounwind
 }
 
 ; Instcombine should constant-fold the GEP so that indices that have
@@ -468,3 +468,12 @@ define i1 @test37() nounwind {
                    getelementptr ([1 x i8]* @A37, i64 1, i64 0)
   ret i1 %t
 }
+
+; Test index promotion
+define i32* @test38(i32* %I, i32 %n) {
+        %A = getelementptr i32* %I, i32 %n
+        ret i32* %A
+; CHECK: @test38
+; CHECK: = sext i32 %n to i64
+; CHECK: %A = getelementptr i32* %I, i64 %
+}