[opaque pointer type] Add textual IR support for explicit type parameter to gep operator
[oota-llvm.git] / test / Transforms / GlobalOpt / constantfold-initializers.ll
index 2d41dfe5641db9ffbb468cc38f695b960412b184..d0c18812cd94e002e2b9f3cb7ef347ca0b889bfb 100644 (file)
@@ -5,7 +5,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
 @.str91250 = global [3 x i8] zeroinitializer
 
 ; CHECK: @A = global i1 false
-@A = global i1 icmp ne (i64 sub nsw (i64 ptrtoint (i8* getelementptr inbounds ([3 x i8]* @.str91250, i64 0, i64 1) to i64), i64 ptrtoint ([3 x i8]* @.str91250 to i64)), i64 1)
+@A = global i1 icmp ne (i64 sub nsw (i64 ptrtoint (i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str91250, i64 0, i64 1) to i64), i64 ptrtoint ([3 x i8]* @.str91250 to i64)), i64 1)
 
 ; PR11352
 
@@ -15,13 +15,13 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
 ; PR12642
 %PR12642.struct = type { i8 }
 @PR12642.s = global <{}> zeroinitializer, align 1
-@PR12642.p = constant %PR12642.struct* bitcast (i8* getelementptr (i8* bitcast (<{}>* @PR12642.s to i8*), i64 1) to %PR12642.struct*), align 8
+@PR12642.p = constant %PR12642.struct* bitcast (i8* getelementptr (i8, i8* bitcast (<{}>* @PR12642.s to i8*), i64 1) to %PR12642.struct*), align 8
 
 define internal void @test1() {
 entry:
-  store i32 1, i32* getelementptr inbounds ([2 x i32]* @xs, i64 0, i64 0)
-  %0 = load i32, i32* getelementptr inbounds ([2 x i32]* @xs, i32 0, i64 0), align 4
-  store i32 %0, i32* getelementptr inbounds ([2 x i32]* @xs, i64 0, i64 1)
+  store i32 1, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @xs, i64 0, i64 0)
+  %0 = load i32, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @xs, i32 0, i64 0), align 4
+  store i32 %0, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @xs, i64 0, i64 1)
   ret void
 }
 
@@ -44,7 +44,7 @@ entry:
 
 define internal void @test2() {
 entry:
-  store i32 4, i32* getelementptr inbounds (%closure* @f, i32 0, i32 0)
+  store i32 4, i32* getelementptr inbounds (%closure, %closure* @f, i32 0, i32 0)
   %call = call i32 @test2_helper(%closure* @f, i32 9)
   store i32 %call, i32* @m, align 4
   ret void