[opaque pointer type] Add textual IR support for explicit type parameter to gep operator
[oota-llvm.git] / test / Instrumentation / AddressSanitizer / instrument_global.ll
index a912f22f66574eef8f8916821d338896914e8c85..7df3d22dcdeae620d4367ab12a480739c8b63d1c 100644 (file)
@@ -20,7 +20,7 @@ target triple = "x86_64-unknown-linux-gnu"
 ; GlobSt is declared here, and has static initializer -- ok to optimize.
 define i32 @AccessGlobSt_0_2() sanitize_address {
 entry:
-    %0 = load i32, i32* getelementptr inbounds ([10 x i32]* @GlobSt, i64 0, i64 2), align 8
+    %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobSt, i64 0, i64 2), align 8
     ret i32 %0
 ; CHECK-LABEL: define i32 @AccessGlobSt_0_2
 ; CHECK-NOT: __asan_report
@@ -30,7 +30,7 @@ entry:
 ; GlobSt is accessed out of bounds -- can't optimize
 define i32 @AccessGlobSt_0_12() sanitize_address {
 entry:
-    %0 = load i32, i32* getelementptr inbounds ([10 x i32]* @GlobSt, i64 0, i64 12), align 8
+    %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobSt, i64 0, i64 12), align 8
     ret i32 %0
 ; CHECK-LABEL: define i32 @AccessGlobSt_0_12
 ; CHECK: __asan_report
@@ -40,7 +40,7 @@ entry:
 ; GlobSt is accessed with Gep that has non-0 first index -- can't optimize.
 define i32 @AccessGlobSt_1_2() sanitize_address {
 entry:
-    %0 = load i32, i32* getelementptr inbounds ([10 x i32]* @GlobSt, i64 1, i64 2), align 8
+    %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobSt, i64 1, i64 2), align 8
     ret i32 %0
 ; CHECK-LABEL: define i32 @AccessGlobSt_1_2
 ; CHECK: __asan_report
@@ -50,7 +50,7 @@ entry:
 ; GlobDy is declared with dynamic initializer -- can't optimize.
 define i32 @AccessGlobDy_0_2() sanitize_address {
 entry:
-    %0 = load i32, i32* getelementptr inbounds ([10 x i32]* @GlobDy, i64 0, i64 2), align 8
+    %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobDy, i64 0, i64 2), align 8
     ret i32 %0
 ; CHECK-LABEL: define i32 @AccessGlobDy_0_2
 ; CHECK: __asan_report
@@ -60,7 +60,7 @@ entry:
 ; GlobEx is an external global -- can't optimize.
 define i32 @AccessGlobEx_0_2() sanitize_address {
 entry:
-    %0 = load i32, i32* getelementptr inbounds ([10 x i32]* @GlobEx, i64 0, i64 2), align 8
+    %0 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @GlobEx, i64 0, i64 2), align 8
     ret i32 %0
 ; CHECK-LABEL: define i32 @AccessGlobEx_0_2
 ; CHECK: __asan_report