aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SROA
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/SROA')
-rw-r--r--test/Transforms/SROA/address-spaces.ll8
-rw-r--r--test/Transforms/SROA/alignment.ll68
-rw-r--r--test/Transforms/SROA/basictest.ll642
-rw-r--r--test/Transforms/SROA/big-endian.ll30
-rw-r--r--test/Transforms/SROA/fca.ll14
-rw-r--r--test/Transforms/SROA/phi-and-select.ll104
-rw-r--r--test/Transforms/SROA/slice-order-independence.ll12
-rw-r--r--test/Transforms/SROA/slice-width.ll20
-rw-r--r--test/Transforms/SROA/vector-conversion.ll6
-rw-r--r--test/Transforms/SROA/vector-lifetime-intrinsic.ll2
-rw-r--r--test/Transforms/SROA/vector-promotion.ll216
-rw-r--r--test/Transforms/SROA/vectors-of-pointers.ll2
12 files changed, 562 insertions, 562 deletions
diff --git a/test/Transforms/SROA/address-spaces.ll b/test/Transforms/SROA/address-spaces.ll
index 847f285..004695d 100644
--- a/test/Transforms/SROA/address-spaces.ll
+++ b/test/Transforms/SROA/address-spaces.ll
@@ -10,7 +10,7 @@ declare void @llvm.memcpy.p1i8.p1i8.i32(i8 addrspace(1)* nocapture, i8 addrspace
; Make sure an illegal bitcast isn't introduced
define void @test_address_space_1_1(<2 x i64> addrspace(1)* %a, i16 addrspace(1)* %b) {
; CHECK-LABEL: @test_address_space_1_1(
-; CHECK: load <2 x i64> addrspace(1)* %a, align 2
+; CHECK: load <2 x i64>, <2 x i64> addrspace(1)* %a, align 2
; CHECK: store <2 x i64> {{.*}}, <2 x i64> addrspace(1)* {{.*}}, align 2
; CHECK: ret void
%aa = alloca <2 x i64>, align 16
@@ -24,7 +24,7 @@ define void @test_address_space_1_1(<2 x i64> addrspace(1)* %a, i16 addrspace(1)
define void @test_address_space_1_0(<2 x i64> addrspace(1)* %a, i16* %b) {
; CHECK-LABEL: @test_address_space_1_0(
-; CHECK: load <2 x i64> addrspace(1)* %a, align 2
+; CHECK: load <2 x i64>, <2 x i64> addrspace(1)* %a, align 2
; CHECK: store <2 x i64> {{.*}}, <2 x i64>* {{.*}}, align 2
; CHECK: ret void
%aa = alloca <2 x i64>, align 16
@@ -38,7 +38,7 @@ define void @test_address_space_1_0(<2 x i64> addrspace(1)* %a, i16* %b) {
define void @test_address_space_0_1(<2 x i64>* %a, i16 addrspace(1)* %b) {
; CHECK-LABEL: @test_address_space_0_1(
-; CHECK: load <2 x i64>* %a, align 2
+; CHECK: load <2 x i64>, <2 x i64>* %a, align 2
; CHECK: store <2 x i64> {{.*}}, <2 x i64> addrspace(1)* {{.*}}, align 2
; CHECK: ret void
%aa = alloca <2 x i64>, align 16
@@ -60,7 +60,7 @@ for.end:
%in = alloca %struct.struct_test_27.0.13, align 8
%0 = bitcast %struct.struct_test_27.0.13* %in to [5 x i64]*
store [5 x i64] %in.coerce, [5 x i64]* %0, align 8
- %scevgep9 = getelementptr %struct.struct_test_27.0.13* %in, i32 0, i32 4, i32 0
+ %scevgep9 = getelementptr %struct.struct_test_27.0.13, %struct.struct_test_27.0.13* %in, i32 0, i32 4, i32 0
%scevgep910 = bitcast i32* %scevgep9 to i8*
call void @llvm.memcpy.p1i8.p0i8.i32(i8 addrspace(1)* undef, i8* %scevgep910, i32 16, i32 4, i1 false)
ret void
diff --git a/test/Transforms/SROA/alignment.ll b/test/Transforms/SROA/alignment.ll
index 4f4e40c..455d142 100644
--- a/test/Transforms/SROA/alignment.ll
+++ b/test/Transforms/SROA/alignment.ll
@@ -5,21 +5,21 @@ declare void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
define void @test1({ i8, i8 }* %a, { i8, i8 }* %b) {
; CHECK-LABEL: @test1(
-; CHECK: %[[gep_a0:.*]] = getelementptr inbounds { i8, i8 }* %a, i64 0, i32 0
-; CHECK: %[[a0:.*]] = load i8* %[[gep_a0]], align 16
-; CHECK: %[[gep_a1:.*]] = getelementptr inbounds { i8, i8 }* %a, i64 0, i32 1
-; CHECK: %[[a1:.*]] = load i8* %[[gep_a1]], align 1
-; CHECK: %[[gep_b0:.*]] = getelementptr inbounds { i8, i8 }* %b, i64 0, i32 0
+; CHECK: %[[gep_a0:.*]] = getelementptr inbounds { i8, i8 }, { i8, i8 }* %a, i64 0, i32 0
+; CHECK: %[[a0:.*]] = load i8, i8* %[[gep_a0]], align 16
+; CHECK: %[[gep_a1:.*]] = getelementptr inbounds { i8, i8 }, { i8, i8 }* %a, i64 0, i32 1
+; CHECK: %[[a1:.*]] = load i8, i8* %[[gep_a1]], align 1
+; CHECK: %[[gep_b0:.*]] = getelementptr inbounds { i8, i8 }, { i8, i8 }* %b, i64 0, i32 0
; CHECK: store i8 %[[a0]], i8* %[[gep_b0]], align 16
-; CHECK: %[[gep_b1:.*]] = getelementptr inbounds { i8, i8 }* %b, i64 0, i32 1
+; CHECK: %[[gep_b1:.*]] = getelementptr inbounds { i8, i8 }, { i8, i8 }* %b, i64 0, i32 1
; CHECK: store i8 %[[a1]], i8* %[[gep_b1]], align 1
; CHECK: ret void
entry:
%alloca = alloca { i8, i8 }, align 16
- %gep_a = getelementptr { i8, i8 }* %a, i32 0, i32 0
- %gep_alloca = getelementptr { i8, i8 }* %alloca, i32 0, i32 0
- %gep_b = getelementptr { i8, i8 }* %b, i32 0, i32 0
+ %gep_a = getelementptr { i8, i8 }, { i8, i8 }* %a, i32 0, i32 0
+ %gep_alloca = getelementptr { i8, i8 }, { i8, i8 }* %alloca, i32 0, i32 0
+ %gep_b = getelementptr { i8, i8 }, { i8, i8 }* %b, i32 0, i32 0
store i8 420, i8* %gep_alloca, align 16
@@ -31,17 +31,17 @@ entry:
define void @test2() {
; CHECK-LABEL: @test2(
; CHECK: alloca i16
-; CHECK: load i8* %{{.*}}
+; CHECK: load i8, i8* %{{.*}}
; CHECK: store i8 42, i8* %{{.*}}
; CHECK: ret void
entry:
%a = alloca { i8, i8, i8, i8 }, align 2
- %gep1 = getelementptr { i8, i8, i8, i8 }* %a, i32 0, i32 1
+ %gep1 = getelementptr { i8, i8, i8, i8 }, { i8, i8, i8, i8 }* %a, i32 0, i32 1
%cast1 = bitcast i8* %gep1 to i16*
store volatile i16 0, i16* %cast1
- %gep2 = getelementptr { i8, i8, i8, i8 }* %a, i32 0, i32 2
- %result = load i8* %gep2
+ %gep2 = getelementptr { i8, i8, i8, i8 }, { i8, i8, i8, i8 }* %a, i32 0, i32 2
+ %result = load i8, i8* %gep2
store i8 42, i8* %gep2
ret void
}
@@ -49,7 +49,7 @@ entry:
define void @PR13920(<2 x i64>* %a, i16* %b) {
; Test that alignments on memcpy intrinsics get propagated to loads and stores.
; CHECK-LABEL: @PR13920(
-; CHECK: load <2 x i64>* %a, align 2
+; CHECK: load <2 x i64>, <2 x i64>* %a, align 2
; CHECK: store <2 x i64> {{.*}}, <2 x i64>* {{.*}}, align 2
; CHECK: ret void
@@ -79,7 +79,7 @@ entry:
%a_raw = bitcast { i8*, i8*, i8* }* %a to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a_raw, i8* %x, i32 22, i32 8, i1 false)
%b_raw = bitcast { i8*, i8*, i8* }* %b to i8*
- %b_gep = getelementptr i8* %b_raw, i32 6
+ %b_gep = getelementptr i8, i8* %b_raw, i32 6
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %b_gep, i8* %x, i32 18, i32 2, i1 false)
ret void
}
@@ -93,28 +93,28 @@ define void @test5() {
; CHECK: alloca [9 x i8]
; CHECK: alloca [9 x i8]
; CHECK: store volatile double 0.0{{.*}}, double* %{{.*}}, align 1
-; CHECK: load volatile i16* %{{.*}}, align 1
-; CHECK: load double* %{{.*}}, align 1
+; CHECK: load volatile i16, i16* %{{.*}}, align 1
+; CHECK: load double, double* %{{.*}}, align 1
; CHECK: store volatile double %{{.*}}, double* %{{.*}}, align 1
-; CHECK: load volatile i16* %{{.*}}, align 1
+; CHECK: load volatile i16, i16* %{{.*}}, align 1
; CHECK: ret void
entry:
%a = alloca [18 x i8]
- %raw1 = getelementptr inbounds [18 x i8]* %a, i32 0, i32 0
+ %raw1 = getelementptr inbounds [18 x i8], [18 x i8]* %a, i32 0, i32 0
%ptr1 = bitcast i8* %raw1 to double*
store volatile double 0.0, double* %ptr1, align 1
- %weird_gep1 = getelementptr inbounds [18 x i8]* %a, i32 0, i32 7
+ %weird_gep1 = getelementptr inbounds [18 x i8], [18 x i8]* %a, i32 0, i32 7
%weird_cast1 = bitcast i8* %weird_gep1 to i16*
- %weird_load1 = load volatile i16* %weird_cast1, align 1
+ %weird_load1 = load volatile i16, i16* %weird_cast1, align 1
- %raw2 = getelementptr inbounds [18 x i8]* %a, i32 0, i32 9
+ %raw2 = getelementptr inbounds [18 x i8], [18 x i8]* %a, i32 0, i32 9
%ptr2 = bitcast i8* %raw2 to double*
- %d1 = load double* %ptr1, align 1
+ %d1 = load double, double* %ptr1, align 1
store volatile double %d1, double* %ptr2, align 1
- %weird_gep2 = getelementptr inbounds [18 x i8]* %a, i32 0, i32 16
+ %weird_gep2 = getelementptr inbounds [18 x i8], [18 x i8]* %a, i32 0, i32 16
%weird_cast2 = bitcast i8* %weird_gep2 to i16*
- %weird_load2 = load volatile i16* %weird_cast2, align 1
+ %weird_load2 = load volatile i16, i16* %weird_cast2, align 1
ret void
}
@@ -130,13 +130,13 @@ define void @test6() {
entry:
%a = alloca [16 x i8]
- %raw1 = getelementptr inbounds [16 x i8]* %a, i32 0, i32 0
+ %raw1 = getelementptr inbounds [16 x i8], [16 x i8]* %a, i32 0, i32 0
%ptr1 = bitcast i8* %raw1 to double*
store volatile double 0.0, double* %ptr1, align 1
- %raw2 = getelementptr inbounds [16 x i8]* %a, i32 0, i32 8
+ %raw2 = getelementptr inbounds [16 x i8], [16 x i8]* %a, i32 0, i32 8
%ptr2 = bitcast i8* %raw2 to double*
- %val = load double* %ptr1, align 1
+ %val = load double, double* %ptr1, align 1
store volatile double %val, double* %ptr2, align 1
ret void
@@ -150,17 +150,17 @@ define void @test7(i8* %out) {
entry:
%a = alloca [16 x i8]
- %raw1 = getelementptr inbounds [16 x i8]* %a, i32 0, i32 0
+ %raw1 = getelementptr inbounds [16 x i8], [16 x i8]* %a, i32 0, i32 0
%ptr1 = bitcast i8* %raw1 to double*
- %raw2 = getelementptr inbounds [16 x i8]* %a, i32 0, i32 8
+ %raw2 = getelementptr inbounds [16 x i8], [16 x i8]* %a, i32 0, i32 8
%ptr2 = bitcast i8* %raw2 to double*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %raw1, i8* %out, i32 16, i32 0, i1 false)
-; CHECK: %[[val2:.*]] = load double* %{{.*}}, align 1
-; CHECK: %[[val1:.*]] = load double* %{{.*}}, align 1
+; CHECK: %[[val2:.*]] = load double, double* %{{.*}}, align 1
+; CHECK: %[[val1:.*]] = load double, double* %{{.*}}, align 1
- %val1 = load double* %ptr2, align 1
- %val2 = load double* %ptr1, align 1
+ %val1 = load double, double* %ptr2, align 1
+ %val2 = load double, double* %ptr1, align 1
store double %val1, double* %ptr1, align 1
store double %val2, double* %ptr2, align 1
diff --git a/test/Transforms/SROA/basictest.ll b/test/Transforms/SROA/basictest.ll
index e3f762a..a59192d 100644
--- a/test/Transforms/SROA/basictest.ll
+++ b/test/Transforms/SROA/basictest.ll
@@ -19,7 +19,7 @@ entry:
call void @llvm.lifetime.start(i64 4, i8* %a1.i8)
store i32 0, i32* %a1
- %v1 = load i32* %a1
+ %v1 = load i32, i32* %a1
call void @llvm.lifetime.end(i64 4, i8* %a1.i8)
@@ -27,7 +27,7 @@ entry:
call void @llvm.lifetime.start(i64 4, i8* %a2.i8)
store float 0.0, float* %a2
- %v2 = load float * %a2
+ %v2 = load float , float * %a2
%v2.int = bitcast float %v2 to i32
%sum1 = add i32 %v1, %v2.int
@@ -43,9 +43,9 @@ define i32 @test1() {
entry:
%X = alloca { i32, float }
- %Y = getelementptr { i32, float }* %X, i64 0, i32 0
+ %Y = getelementptr { i32, float }, { i32, float }* %X, i64 0, i32 0
store i32 0, i32* %Y
- %Z = load i32* %Y
+ %Z = load i32, i32* %Y
ret i32 %Z
}
@@ -61,7 +61,7 @@ entry:
br label %L2
L2:
- %Z = load i64* %B
+ %Z = load i64, i64* %B
ret i64 %Z
}
@@ -79,48 +79,48 @@ entry:
; CHECK-NEXT: %[[test3_a6:.*]] = alloca [7 x i8]
; CHECK-NEXT: %[[test3_a7:.*]] = alloca [85 x i8]
- %b = getelementptr [300 x i8]* %a, i64 0, i64 0
+ %b = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 0
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %b, i8* %src, i32 300, i32 1, i1 false)
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [42 x i8]* %[[test3_a1]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [42 x i8], [42 x i8]* %[[test3_a1]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %src, i32 42
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %src, i64 42
-; CHECK-NEXT: %[[test3_r1:.*]] = load i8* %[[gep]]
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 43
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [99 x i8]* %[[test3_a2]], i64 0, i64 0
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %src, i64 42
+; CHECK-NEXT: %[[test3_r1:.*]] = load i8, i8* %[[gep]]
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 43
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [99 x i8], [99 x i8]* %[[test3_a2]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 99
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 142
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 142
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 16
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 158
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [42 x i8]* %[[test3_a4]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 158
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [42 x i8], [42 x i8]* %[[test3_a4]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 42
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 200
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a5]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 200
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a5]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %src, i64 207
-; CHECK-NEXT: %[[test3_r2:.*]] = load i8* %[[gep]]
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 208
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 0
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %src, i64 207
+; CHECK-NEXT: %[[test3_r2:.*]] = load i8, i8* %[[gep]]
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 208
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 215
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [85 x i8]* %[[test3_a7]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 215
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [85 x i8], [85 x i8]* %[[test3_a7]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 85
; Clobber a single element of the array, this should be promotable.
- %c = getelementptr [300 x i8]* %a, i64 0, i64 42
+ %c = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 42
store i8 0, i8* %c
; Make a sequence of overlapping stores to the array. These overlap both in
; forward strides and in shrinking accesses.
- %overlap.1.i8 = getelementptr [300 x i8]* %a, i64 0, i64 142
- %overlap.2.i8 = getelementptr [300 x i8]* %a, i64 0, i64 143
- %overlap.3.i8 = getelementptr [300 x i8]* %a, i64 0, i64 144
- %overlap.4.i8 = getelementptr [300 x i8]* %a, i64 0, i64 145
- %overlap.5.i8 = getelementptr [300 x i8]* %a, i64 0, i64 146
- %overlap.6.i8 = getelementptr [300 x i8]* %a, i64 0, i64 147
- %overlap.7.i8 = getelementptr [300 x i8]* %a, i64 0, i64 148
- %overlap.8.i8 = getelementptr [300 x i8]* %a, i64 0, i64 149
- %overlap.9.i8 = getelementptr [300 x i8]* %a, i64 0, i64 150
+ %overlap.1.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 142
+ %overlap.2.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 143
+ %overlap.3.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 144
+ %overlap.4.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 145
+ %overlap.5.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 146
+ %overlap.6.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 147
+ %overlap.7.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 148
+ %overlap.8.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 149
+ %overlap.9.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 150
%overlap.1.i16 = bitcast i8* %overlap.1.i8 to i16*
%overlap.1.i32 = bitcast i8* %overlap.1.i8 to i32*
%overlap.1.i64 = bitcast i8* %overlap.1.i8 to i64*
@@ -133,7 +133,7 @@ entry:
%overlap.8.i64 = bitcast i8* %overlap.8.i8 to i64*
%overlap.9.i64 = bitcast i8* %overlap.9.i8 to i64*
store i8 1, i8* %overlap.1.i8
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 0
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 0
; CHECK-NEXT: store i8 1, i8* %[[gep]]
store i16 1, i16* %overlap.1.i16
; CHECK-NEXT: %[[bitcast:.*]] = bitcast [16 x i8]* %[[test3_a3]] to i16*
@@ -145,48 +145,48 @@ entry:
; CHECK-NEXT: %[[bitcast:.*]] = bitcast [16 x i8]* %[[test3_a3]] to i64*
; CHECK-NEXT: store i64 1, i64* %[[bitcast]]
store i64 2, i64* %overlap.2.i64
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 1
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 1
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i64*
; CHECK-NEXT: store i64 2, i64* %[[bitcast]]
store i64 3, i64* %overlap.3.i64
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 2
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 2
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i64*
; CHECK-NEXT: store i64 3, i64* %[[bitcast]]
store i64 4, i64* %overlap.4.i64
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 3
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 3
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i64*
; CHECK-NEXT: store i64 4, i64* %[[bitcast]]
store i64 5, i64* %overlap.5.i64
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 4
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 4
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i64*
; CHECK-NEXT: store i64 5, i64* %[[bitcast]]
store i64 6, i64* %overlap.6.i64
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 5
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 5
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i64*
; CHECK-NEXT: store i64 6, i64* %[[bitcast]]
store i64 7, i64* %overlap.7.i64
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 6
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 6
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i64*
; CHECK-NEXT: store i64 7, i64* %[[bitcast]]
store i64 8, i64* %overlap.8.i64
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 7
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 7
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i64*
; CHECK-NEXT: store i64 8, i64* %[[bitcast]]
store i64 9, i64* %overlap.9.i64
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 8
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 8
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i64*
; CHECK-NEXT: store i64 9, i64* %[[bitcast]]
; Make two sequences of overlapping stores with more gaps and irregularities.
- %overlap2.1.0.i8 = getelementptr [300 x i8]* %a, i64 0, i64 200
- %overlap2.1.1.i8 = getelementptr [300 x i8]* %a, i64 0, i64 201
- %overlap2.1.2.i8 = getelementptr [300 x i8]* %a, i64 0, i64 202
- %overlap2.1.3.i8 = getelementptr [300 x i8]* %a, i64 0, i64 203
+ %overlap2.1.0.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 200
+ %overlap2.1.1.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 201
+ %overlap2.1.2.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 202
+ %overlap2.1.3.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 203
- %overlap2.2.0.i8 = getelementptr [300 x i8]* %a, i64 0, i64 208
- %overlap2.2.1.i8 = getelementptr [300 x i8]* %a, i64 0, i64 209
- %overlap2.2.2.i8 = getelementptr [300 x i8]* %a, i64 0, i64 210
- %overlap2.2.3.i8 = getelementptr [300 x i8]* %a, i64 0, i64 211
+ %overlap2.2.0.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 208
+ %overlap2.2.1.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 209
+ %overlap2.2.2.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 210
+ %overlap2.2.3.i8 = getelementptr [300 x i8], [300 x i8]* %a, i64 0, i64 211
%overlap2.1.0.i16 = bitcast i8* %overlap2.1.0.i8 to i16*
%overlap2.1.0.i32 = bitcast i8* %overlap2.1.0.i8 to i32*
@@ -194,7 +194,7 @@ entry:
%overlap2.1.2.i32 = bitcast i8* %overlap2.1.2.i8 to i32*
%overlap2.1.3.i32 = bitcast i8* %overlap2.1.3.i8 to i32*
store i8 1, i8* %overlap2.1.0.i8
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a5]], i64 0, i64 0
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a5]], i64 0, i64 0
; CHECK-NEXT: store i8 1, i8* %[[gep]]
store i16 1, i16* %overlap2.1.0.i16
; CHECK-NEXT: %[[bitcast:.*]] = bitcast [7 x i8]* %[[test3_a5]] to i16*
@@ -203,15 +203,15 @@ entry:
; CHECK-NEXT: %[[bitcast:.*]] = bitcast [7 x i8]* %[[test3_a5]] to i32*
; CHECK-NEXT: store i32 1, i32* %[[bitcast]]
store i32 2, i32* %overlap2.1.1.i32
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a5]], i64 0, i64 1
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a5]], i64 0, i64 1
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i32*
; CHECK-NEXT: store i32 2, i32* %[[bitcast]]
store i32 3, i32* %overlap2.1.2.i32
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a5]], i64 0, i64 2
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a5]], i64 0, i64 2
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i32*
; CHECK-NEXT: store i32 3, i32* %[[bitcast]]
store i32 4, i32* %overlap2.1.3.i32
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a5]], i64 0, i64 3
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a5]], i64 0, i64 3
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i32*
; CHECK-NEXT: store i32 4, i32* %[[bitcast]]
@@ -224,78 +224,78 @@ entry:
; CHECK-NEXT: %[[bitcast:.*]] = bitcast [7 x i8]* %[[test3_a6]] to i32*
; CHECK-NEXT: store i32 1, i32* %[[bitcast]]
store i8 1, i8* %overlap2.2.1.i8
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 1
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 1
; CHECK-NEXT: store i8 1, i8* %[[gep]]
store i16 1, i16* %overlap2.2.1.i16
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 1
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 1
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i16*
; CHECK-NEXT: store i16 1, i16* %[[bitcast]]
store i32 1, i32* %overlap2.2.1.i32
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 1
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 1
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i32*
; CHECK-NEXT: store i32 1, i32* %[[bitcast]]
store i32 3, i32* %overlap2.2.2.i32
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 2
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 2
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i32*
; CHECK-NEXT: store i32 3, i32* %[[bitcast]]
store i32 4, i32* %overlap2.2.3.i32
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 3
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 3
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i32*
; CHECK-NEXT: store i32 4, i32* %[[bitcast]]
- %overlap2.prefix = getelementptr i8* %overlap2.1.1.i8, i64 -4
+ %overlap2.prefix = getelementptr i8, i8* %overlap2.1.1.i8, i64 -4
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %overlap2.prefix, i8* %src, i32 8, i32 1, i1 false)
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [42 x i8]* %[[test3_a4]], i64 0, i64 39
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [42 x i8], [42 x i8]* %[[test3_a4]], i64 0, i64 39
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %src, i32 3
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 3
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a5]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 3
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a5]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 5
; Bridge between the overlapping areas
call void @llvm.memset.p0i8.i32(i8* %overlap2.1.2.i8, i8 42, i32 8, i32 1, i1 false)
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a5]], i64 0, i64 2
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a5]], i64 0, i64 2
; CHECK-NEXT: call void @llvm.memset.p0i8.i32(i8* %[[gep]], i8 42, i32 5
; ...promoted i8 store...
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 0
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memset.p0i8.i32(i8* %[[gep]], i8 42, i32 2
; Entirely within the second overlap.
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %overlap2.2.1.i8, i8* %src, i32 5, i32 1, i1 false)
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 1
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 1
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep]], i8* %src, i32 5
; Trailing past the second overlap.
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %overlap2.2.2.i8, i8* %src, i32 8, i32 1, i1 false)
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 2
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 2
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep]], i8* %src, i32 5
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 5
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [85 x i8]* %[[test3_a7]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 5
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [85 x i8], [85 x i8]* %[[test3_a7]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 3
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %b, i32 300, i32 1, i1 false)
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [42 x i8]* %[[test3_a1]], i64 0, i64 0
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [42 x i8], [42 x i8]* %[[test3_a1]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %[[gep]], i32 42
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %dst, i64 42
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %dst, i64 42
; CHECK-NEXT: store i8 0, i8* %[[gep]]
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 43
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [99 x i8]* %[[test3_a2]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 43
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [99 x i8], [99 x i8]* %[[test3_a2]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 99
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 142
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [16 x i8]* %[[test3_a3]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 142
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [16 x i8], [16 x i8]* %[[test3_a3]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 16
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 158
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [42 x i8]* %[[test3_a4]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 158
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [42 x i8], [42 x i8]* %[[test3_a4]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 42
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 200
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a5]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 200
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a5]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %dst, i64 207
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %dst, i64 207
; CHECK-NEXT: store i8 42, i8* %[[gep]]
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 208
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8]* %[[test3_a6]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 208
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test3_a6]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 215
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [85 x i8]* %[[test3_a7]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 215
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [85 x i8], [85 x i8]* %[[test3_a7]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 85
ret void
@@ -314,90 +314,90 @@ entry:
; CHECK-NEXT: %[[test4_a5:.*]] = alloca [7 x i8]
; CHECK-NEXT: %[[test4_a6:.*]] = alloca [40 x i8]
- %b = getelementptr [100 x i8]* %a, i64 0, i64 0
+ %b = getelementptr [100 x i8], [100 x i8]* %a, i64 0, i64 0
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %b, i8* %src, i32 100, i32 1, i1 false)
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [20 x i8]* %[[test4_a1]], i64 0, i64 0
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [20 x i8], [20 x i8]* %[[test4_a1]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep]], i8* %src, i32 20
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %src, i64 20
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %src, i64 20
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i16*
-; CHECK-NEXT: %[[test4_r1:.*]] = load i16* %[[bitcast]]
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %src, i64 22
-; CHECK-NEXT: %[[test4_r2:.*]] = load i8* %[[gep]]
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 23
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a2]], i64 0, i64 0
+; CHECK-NEXT: %[[test4_r1:.*]] = load i16, i16* %[[bitcast]]
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %src, i64 22
+; CHECK-NEXT: %[[test4_r2:.*]] = load i8, i8* %[[gep]]
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 23
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a2]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 30
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [10 x i8]* %[[test4_a3]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 30
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [10 x i8], [10 x i8]* %[[test4_a3]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 10
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %src, i64 40
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %src, i64 40
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i16*
-; CHECK-NEXT: %[[test4_r3:.*]] = load i16* %[[bitcast]]
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %src, i64 42
-; CHECK-NEXT: %[[test4_r4:.*]] = load i8* %[[gep]]
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 43
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a4]], i64 0, i64 0
+; CHECK-NEXT: %[[test4_r3:.*]] = load i16, i16* %[[bitcast]]
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %src, i64 42
+; CHECK-NEXT: %[[test4_r4:.*]] = load i8, i8* %[[gep]]
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 43
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a4]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %src, i64 50
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %src, i64 50
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i16*
-; CHECK-NEXT: %[[test4_r5:.*]] = load i16* %[[bitcast]]
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %src, i64 52
-; CHECK-NEXT: %[[test4_r6:.*]] = load i8* %[[gep]]
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 53
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a5]], i64 0, i64 0
+; CHECK-NEXT: %[[test4_r5:.*]] = load i16, i16* %[[bitcast]]
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %src, i64 52
+; CHECK-NEXT: %[[test4_r6:.*]] = load i8, i8* %[[gep]]
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 53
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a5]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8* %src, i64 60
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [40 x i8]* %[[test4_a6]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds i8, i8* %src, i64 60
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [40 x i8], [40 x i8]* %[[test4_a6]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 40
- %a.src.1 = getelementptr [100 x i8]* %a, i64 0, i64 20
- %a.dst.1 = getelementptr [100 x i8]* %a, i64 0, i64 40
+ %a.src.1 = getelementptr [100 x i8], [100 x i8]* %a, i64 0, i64 20
+ %a.dst.1 = getelementptr [100 x i8], [100 x i8]* %a, i64 0, i64 40
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.dst.1, i8* %a.src.1, i32 10, i32 1, i1 false)
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a4]], i64 0, i64 0
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a2]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a4]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a2]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
; Clobber a single element of the array, this should be promotable, and be deleted.
- %c = getelementptr [100 x i8]* %a, i64 0, i64 42
+ %c = getelementptr [100 x i8], [100 x i8]* %a, i64 0, i64 42
store i8 0, i8* %c
- %a.src.2 = getelementptr [100 x i8]* %a, i64 0, i64 50
+ %a.src.2 = getelementptr [100 x i8], [100 x i8]* %a, i64 0, i64 50
call void @llvm.memmove.p0i8.p0i8.i32(i8* %a.dst.1, i8* %a.src.2, i32 10, i32 1, i1 false)
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a4]], i64 0, i64 0
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a5]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a4]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a5]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %b, i32 100, i32 1, i1 false)
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [20 x i8]* %[[test4_a1]], i64 0, i64 0
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds [20 x i8], [20 x i8]* %[[test4_a1]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %[[gep]], i32 20
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %dst, i64 20
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %dst, i64 20
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i16*
; CHECK-NEXT: store i16 %[[test4_r1]], i16* %[[bitcast]]
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %dst, i64 22
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %dst, i64 22
; CHECK-NEXT: store i8 %[[test4_r2]], i8* %[[gep]]
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 23
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a2]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 23
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a2]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 30
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [10 x i8]* %[[test4_a3]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 30
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [10 x i8], [10 x i8]* %[[test4_a3]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 10
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %dst, i64 40
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %dst, i64 40
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i16*
; CHECK-NEXT: store i16 %[[test4_r5]], i16* %[[bitcast]]
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %dst, i64 42
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %dst, i64 42
; CHECK-NEXT: store i8 %[[test4_r6]], i8* %[[gep]]
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 43
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a4]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 43
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a4]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %dst, i64 50
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %dst, i64 50
; CHECK-NEXT: %[[bitcast:.*]] = bitcast i8* %[[gep]] to i16*
; CHECK-NEXT: store i16 %[[test4_r5]], i16* %[[bitcast]]
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8* %dst, i64 52
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds i8, i8* %dst, i64 52
; CHECK-NEXT: store i8 %[[test4_r6]], i8* %[[gep]]
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 53
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8]* %[[test4_a5]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 53
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [7 x i8], [7 x i8]* %[[test4_a5]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 7
-; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8* %dst, i64 60
-; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [40 x i8]* %[[test4_a6]], i64 0, i64 0
+; CHECK-NEXT: %[[gep_dst:.*]] = getelementptr inbounds i8, i8* %dst, i64 60
+; CHECK-NEXT: %[[gep_src:.*]] = getelementptr inbounds [40 x i8], [40 x i8]* %[[test4_a6]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[gep_dst]], i8* %[[gep_src]], i32 40
ret void
@@ -420,9 +420,9 @@ entry:
%a = alloca [4 x i8]
%fptr = bitcast [4 x i8]* %a to float*
store float 0.0, float* %fptr
- %ptr = getelementptr [4 x i8]* %a, i32 0, i32 2
+ %ptr = getelementptr [4 x i8], [4 x i8]* %a, i32 0, i32 2
%iptr = bitcast i8* %ptr to i16*
- %val = load i16* %iptr
+ %val = load i16, i16* %iptr
ret i16 %val
}
@@ -430,15 +430,15 @@ define i32 @test6() {
; CHECK-LABEL: @test6(
; CHECK: alloca i32
; CHECK-NEXT: store volatile i32
-; CHECK-NEXT: load i32*
+; CHECK-NEXT: load i32, i32*
; CHECK-NEXT: ret i32
entry:
%a = alloca [4 x i8]
- %ptr = getelementptr [4 x i8]* %a, i32 0, i32 0
+ %ptr = getelementptr [4 x i8], [4 x i8]* %a, i32 0, i32 0
call void @llvm.memset.p0i8.i32(i8* %ptr, i8 42, i32 4, i32 1, i1 true)
%iptr = bitcast i8* %ptr to i32*
- %val = load i32* %iptr
+ %val = load i32, i32* %iptr
ret i32 %val
}
@@ -446,16 +446,16 @@ define void @test7(i8* %src, i8* %dst) {
; CHECK-LABEL: @test7(
; CHECK: alloca i32
; CHECK-NEXT: bitcast i8* %src to i32*
-; CHECK-NEXT: load volatile i32*
+; CHECK-NEXT: load volatile i32, i32*
; CHECK-NEXT: store volatile i32
; CHECK-NEXT: bitcast i8* %dst to i32*
-; CHECK-NEXT: load volatile i32*
+; CHECK-NEXT: load volatile i32, i32*
; CHECK-NEXT: store volatile i32
; CHECK-NEXT: ret
entry:
%a = alloca [4 x i8]
- %ptr = getelementptr [4 x i8]* %a, i32 0, i32 0
+ %ptr = getelementptr [4 x i8], [4 x i8]* %a, i32 0, i32 0
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %ptr, i8* %src, i32 4, i32 1, i1 true)
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %ptr, i32 4, i32 1, i1 true)
ret void
@@ -471,28 +471,28 @@ entry:
%new = alloca %S2
; CHECK-NOT: alloca
- %s2.next.ptr = getelementptr %S2* %s2, i64 0, i32 1
- %s2.next = load %S2** %s2.next.ptr
-; CHECK: %[[gep:.*]] = getelementptr %S2* %s2, i64 0, i32 1
-; CHECK-NEXT: %[[next:.*]] = load %S2** %[[gep]]
+ %s2.next.ptr = getelementptr %S2, %S2* %s2, i64 0, i32 1
+ %s2.next = load %S2*, %S2** %s2.next.ptr
+; CHECK: %[[gep:.*]] = getelementptr %S2, %S2* %s2, i64 0, i32 1
+; CHECK-NEXT: %[[next:.*]] = load %S2*, %S2** %[[gep]]
- %s2.next.s1.ptr = getelementptr %S2* %s2.next, i64 0, i32 0
- %s2.next.s1 = load %S1** %s2.next.s1.ptr
- %new.s1.ptr = getelementptr %S2* %new, i64 0, i32 0
+ %s2.next.s1.ptr = getelementptr %S2, %S2* %s2.next, i64 0, i32 0
+ %s2.next.s1 = load %S1*, %S1** %s2.next.s1.ptr
+ %new.s1.ptr = getelementptr %S2, %S2* %new, i64 0, i32 0
store %S1* %s2.next.s1, %S1** %new.s1.ptr
- %s2.next.next.ptr = getelementptr %S2* %s2.next, i64 0, i32 1
- %s2.next.next = load %S2** %s2.next.next.ptr
- %new.next.ptr = getelementptr %S2* %new, i64 0, i32 1
+ %s2.next.next.ptr = getelementptr %S2, %S2* %s2.next, i64 0, i32 1
+ %s2.next.next = load %S2*, %S2** %s2.next.next.ptr
+ %new.next.ptr = getelementptr %S2, %S2* %new, i64 0, i32 1
store %S2* %s2.next.next, %S2** %new.next.ptr
-; CHECK-NEXT: %[[gep:.*]] = getelementptr %S2* %[[next]], i64 0, i32 0
-; CHECK-NEXT: %[[next_s1:.*]] = load %S1** %[[gep]]
-; CHECK-NEXT: %[[gep:.*]] = getelementptr %S2* %[[next]], i64 0, i32 1
-; CHECK-NEXT: %[[next_next:.*]] = load %S2** %[[gep]]
+; CHECK-NEXT: %[[gep:.*]] = getelementptr %S2, %S2* %[[next]], i64 0, i32 0
+; CHECK-NEXT: %[[next_s1:.*]] = load %S1*, %S1** %[[gep]]
+; CHECK-NEXT: %[[gep:.*]] = getelementptr %S2, %S2* %[[next]], i64 0, i32 1
+; CHECK-NEXT: %[[next_next:.*]] = load %S2*, %S2** %[[gep]]
- %new.s1 = load %S1** %new.s1.ptr
+ %new.s1 = load %S1*, %S1** %new.s1.ptr
%result1 = insertvalue %S2 undef, %S1* %new.s1, 0
; CHECK-NEXT: %[[result1:.*]] = insertvalue %S2 undef, %S1* %[[next_s1]], 0
- %new.next = load %S2** %new.next.ptr
+ %new.next = load %S2*, %S2** %new.next.ptr
%result2 = insertvalue %S2 %result1, %S2* %new.next, 1
; CHECK-NEXT: %[[result2:.*]] = insertvalue %S2 %[[result1]], %S2* %[[next_next]], 1
ret %S2 %result2
@@ -522,15 +522,15 @@ define i64 @test9() {
entry:
%a = alloca { [3 x i8] }, align 8
- %gep1 = getelementptr inbounds { [3 x i8] }* %a, i32 0, i32 0, i32 0
+ %gep1 = getelementptr inbounds { [3 x i8] }, { [3 x i8] }* %a, i32 0, i32 0, i32 0
store i8 0, i8* %gep1, align 1
- %gep2 = getelementptr inbounds { [3 x i8] }* %a, i32 0, i32 0, i32 1
+ %gep2 = getelementptr inbounds { [3 x i8] }, { [3 x i8] }* %a, i32 0, i32 0, i32 1
store i8 0, i8* %gep2, align 1
- %gep3 = getelementptr inbounds { [3 x i8] }* %a, i32 0, i32 0, i32 2
+ %gep3 = getelementptr inbounds { [3 x i8] }, { [3 x i8] }* %a, i32 0, i32 0, i32 2
store i8 26, i8* %gep3, align 1
%cast = bitcast { [3 x i8] }* %a to { i64 }*
- %elt = getelementptr inbounds { i64 }* %cast, i32 0, i32 0
- %load = load i64* %elt
+ %elt = getelementptr inbounds { i64 }, { i64 }* %cast, i32 0, i32 0
+ %load = load i64, i64* %elt
%result = and i64 %load, 16777215
ret i64 %result
}
@@ -542,10 +542,10 @@ define %S2* @test10() {
entry:
%a = alloca [8 x i8]
- %ptr = getelementptr [8 x i8]* %a, i32 0, i32 0
+ %ptr = getelementptr [8 x i8], [8 x i8]* %a, i32 0, i32 0
call void @llvm.memset.p0i8.i32(i8* %ptr, i8 0, i32 8, i32 1, i1 false)
%s2ptrptr = bitcast i8* %ptr to %S2**
- %s2ptr = load %S2** %s2ptrptr
+ %s2ptr = load %S2*, %S2** %s2ptrptr
ret %S2* %s2ptr
}
@@ -559,15 +559,15 @@ entry:
br i1 undef, label %good, label %bad
good:
- %Y = getelementptr i32* %X, i64 0
+ %Y = getelementptr i32, i32* %X, i64 0
store i32 0, i32* %Y
- %Z = load i32* %Y
+ %Z = load i32, i32* %Y
ret i32 %Z
bad:
- %Y2 = getelementptr i32* %X, i64 1
+ %Y2 = getelementptr i32, i32* %X, i64 1
store i32 0, i32* %Y2
- %Z2 = load i32* %Y2
+ %Z2 = load i32, i32* %Y2
ret i32 %Z2
}
@@ -582,14 +582,14 @@ entry:
%b = alloca [3 x i8]
; CHECK-NOT: alloca
- %a0ptr = getelementptr [3 x i8]* %a, i64 0, i32 0
+ %a0ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 0
store i8 0, i8* %a0ptr
- %a1ptr = getelementptr [3 x i8]* %a, i64 0, i32 1
+ %a1ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 1
store i8 0, i8* %a1ptr
- %a2ptr = getelementptr [3 x i8]* %a, i64 0, i32 2
+ %a2ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 2
store i8 0, i8* %a2ptr
%aiptr = bitcast [3 x i8]* %a to i24*
- %ai = load i24* %aiptr
+ %ai = load i24, i24* %aiptr
; CHECK-NOT: store
; CHECK-NOT: load
; CHECK: %[[ext2:.*]] = zext i8 0 to i24
@@ -606,12 +606,12 @@ entry:
%biptr = bitcast [3 x i8]* %b to i24*
store i24 %ai, i24* %biptr
- %b0ptr = getelementptr [3 x i8]* %b, i64 0, i32 0
- %b0 = load i8* %b0ptr
- %b1ptr = getelementptr [3 x i8]* %b, i64 0, i32 1
- %b1 = load i8* %b1ptr
- %b2ptr = getelementptr [3 x i8]* %b, i64 0, i32 2
- %b2 = load i8* %b2ptr
+ %b0ptr = getelementptr [3 x i8], [3 x i8]* %b, i64 0, i32 0
+ %b0 = load i8, i8* %b0ptr
+ %b1ptr = getelementptr [3 x i8], [3 x i8]* %b, i64 0, i32 1
+ %b1 = load i8, i8* %b1ptr
+ %b2ptr = getelementptr [3 x i8], [3 x i8]* %b, i64 0, i32 2
+ %b2 = load i8, i8* %b2ptr
; CHECK-NOT: store
; CHECK-NOT: load
; CHECK: %[[trunc0:.*]] = trunc i24 %[[insert0]] to i8
@@ -638,15 +638,15 @@ define i32 @test13() {
entry:
%a = alloca [3 x i8], align 2
- %b0ptr = getelementptr [3 x i8]* %a, i64 0, i32 0
+ %b0ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 0
store i8 0, i8* %b0ptr
- %b1ptr = getelementptr [3 x i8]* %a, i64 0, i32 1
+ %b1ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 1
store i8 0, i8* %b1ptr
- %b2ptr = getelementptr [3 x i8]* %a, i64 0, i32 2
+ %b2ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 2
store i8 0, i8* %b2ptr
%iptrcast = bitcast [3 x i8]* %a to i16*
- %iptrgep = getelementptr i16* %iptrcast, i64 1
- %i = load i16* %iptrgep
+ %iptrgep = getelementptr i16, i16* %iptrcast, i64 1
+ %i = load i16, i16* %iptrgep
%ret = zext i16 %i to i32
ret i32 %ret
}
@@ -666,21 +666,21 @@ entry:
%a = alloca %test14.struct
%p = alloca %test14.struct*
%0 = bitcast %test14.struct* %a to i8*
- %1 = getelementptr i8* %0, i64 12
+ %1 = getelementptr i8, i8* %0, i64 12
%2 = bitcast i8* %1 to %test14.struct*
- %3 = getelementptr inbounds %test14.struct* %2, i32 0, i32 0
- %4 = getelementptr inbounds %test14.struct* %a, i32 0, i32 0
+ %3 = getelementptr inbounds %test14.struct, %test14.struct* %2, i32 0, i32 0
+ %4 = getelementptr inbounds %test14.struct, %test14.struct* %a, i32 0, i32 0
%5 = bitcast [3 x i32]* %3 to i32*
%6 = bitcast [3 x i32]* %4 to i32*
- %7 = load i32* %6, align 4
+ %7 = load i32, i32* %6, align 4
store i32 %7, i32* %5, align 4
- %8 = getelementptr inbounds i32* %5, i32 1
- %9 = getelementptr inbounds i32* %6, i32 1
- %10 = load i32* %9, align 4
+ %8 = getelementptr inbounds i32, i32* %5, i32 1
+ %9 = getelementptr inbounds i32, i32* %6, i32 1
+ %10 = load i32, i32* %9, align 4
store i32 %10, i32* %8, align 4
- %11 = getelementptr inbounds i32* %5, i32 2
- %12 = getelementptr inbounds i32* %6, i32 2
- %13 = load i32* %12, align 4
+ %11 = getelementptr inbounds i32, i32* %5, i32 2
+ %12 = getelementptr inbounds i32, i32* %6, i32 2
+ %13 = load i32, i32* %12, align 4
store i32 %13, i32* %11, align 4
ret void
}
@@ -707,25 +707,25 @@ loop:
store i64 1879048192, i64* %l0, align 8
%bc0 = bitcast i64* %l0 to i8*
- %gep0 = getelementptr i8* %bc0, i64 3
+ %gep0 = getelementptr i8, i8* %bc0, i64 3
%dead0 = bitcast i8* %gep0 to i64*
store i64 1879048192, i64* %l1, align 8
%bc1 = bitcast i64* %l1 to i8*
- %gep1 = getelementptr i8* %bc1, i64 3
- %dead1 = getelementptr i8* %gep1, i64 1
+ %gep1 = getelementptr i8, i8* %bc1, i64 3
+ %dead1 = getelementptr i8, i8* %gep1, i64 1
store i64 1879048192, i64* %l2, align 8
%bc2 = bitcast i64* %l2 to i8*
- %gep2.1 = getelementptr i8* %bc2, i64 1
- %gep2.2 = getelementptr i8* %bc2, i64 3
+ %gep2.1 = getelementptr i8, i8* %bc2, i64 1
+ %gep2.2 = getelementptr i8, i8* %bc2, i64 3
; Note that this select should get visited multiple times due to using two
; different GEPs off the same alloca. We should only delete it once.
%dead2 = select i1 %flag, i8* %gep2.1, i8* %gep2.2
store i64 1879048192, i64* %l3, align 8
%bc3 = bitcast i64* %l3 to i8*
- %gep3 = getelementptr i8* %bc3, i64 3
+ %gep3 = getelementptr i8, i8* %bc3, i64 3
br label %loop
}
@@ -735,14 +735,14 @@ define void @test16(i8* %src, i8* %dst) {
; CHECK-LABEL: @test16(
; CHECK-NOT: alloca
; CHECK: %[[srccast:.*]] = bitcast i8* %src to i24*
-; CHECK-NEXT: load i24* %[[srccast]]
+; CHECK-NEXT: load i24, i24* %[[srccast]]
; CHECK-NEXT: %[[dstcast:.*]] = bitcast i8* %dst to i24*
; CHECK-NEXT: store i24 0, i24* %[[dstcast]]
; CHECK-NEXT: ret void
entry:
%a = alloca [3 x i8]
- %ptr = getelementptr [3 x i8]* %a, i32 0, i32 0
+ %ptr = getelementptr [3 x i8], [3 x i8]* %a, i32 0, i32 0
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %ptr, i8* %src, i32 4, i32 1, i1 false)
%cast = bitcast i8* %ptr to i24*
store i24 0, i24* %cast
@@ -755,14 +755,14 @@ define void @test17(i8* %src, i8* %dst) {
; the alloca.
; CHECK-LABEL: @test17(
; CHECK: %[[a:.*]] = alloca [3 x i8]
-; CHECK-NEXT: %[[ptr:.*]] = getelementptr [3 x i8]* %[[a]], i32 0, i32 0
+; CHECK-NEXT: %[[ptr:.*]] = getelementptr [3 x i8], [3 x i8]* %[[a]], i32 0, i32 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[ptr]], i8* %src,
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %[[ptr]],
; CHECK-NEXT: ret void
entry:
%a = alloca [3 x i8]
- %ptr = getelementptr [3 x i8]* %a, i32 0, i32 0
+ %ptr = getelementptr [3 x i8], [3 x i8]* %a, i32 0, i32 0
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %ptr, i8* %src, i32 4, i32 1, i1 true)
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %ptr, i32 4, i32 1, i1 true)
ret void
@@ -774,27 +774,27 @@ define void @test18(i8* %src, i8* %dst, i32 %size) {
; the variable sized intrinsic.
; CHECK-LABEL: @test18(
; CHECK: %[[a:.*]] = alloca [34 x i8]
-; CHECK: %[[srcgep1:.*]] = getelementptr inbounds i8* %src, i64 4
+; CHECK: %[[srcgep1:.*]] = getelementptr inbounds i8, i8* %src, i64 4
; CHECK-NEXT: %[[srccast1:.*]] = bitcast i8* %[[srcgep1]] to i32*
-; CHECK-NEXT: %[[srcload:.*]] = load i32* %[[srccast1]]
-; CHECK-NEXT: %[[agep1:.*]] = getelementptr inbounds [34 x i8]* %[[a]], i64 0, i64 0
+; CHECK-NEXT: %[[srcload:.*]] = load i32, i32* %[[srccast1]]
+; CHECK-NEXT: %[[agep1:.*]] = getelementptr inbounds [34 x i8], [34 x i8]* %[[a]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[agep1]], i8* %src, i32 %size,
-; CHECK-NEXT: %[[agep2:.*]] = getelementptr inbounds [34 x i8]* %[[a]], i64 0, i64 0
+; CHECK-NEXT: %[[agep2:.*]] = getelementptr inbounds [34 x i8], [34 x i8]* %[[a]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memset.p0i8.i32(i8* %[[agep2]], i8 42, i32 %size,
; CHECK-NEXT: %[[dstcast1:.*]] = bitcast i8* %dst to i32*
; CHECK-NEXT: store i32 42, i32* %[[dstcast1]]
-; CHECK-NEXT: %[[dstgep1:.*]] = getelementptr inbounds i8* %dst, i64 4
+; CHECK-NEXT: %[[dstgep1:.*]] = getelementptr inbounds i8, i8* %dst, i64 4
; CHECK-NEXT: %[[dstcast2:.*]] = bitcast i8* %[[dstgep1]] to i32*
; CHECK-NEXT: store i32 %[[srcload]], i32* %[[dstcast2]]
-; CHECK-NEXT: %[[agep3:.*]] = getelementptr inbounds [34 x i8]* %[[a]], i64 0, i64 0
+; CHECK-NEXT: %[[agep3:.*]] = getelementptr inbounds [34 x i8], [34 x i8]* %[[a]], i64 0, i64 0
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dst, i8* %[[agep3]], i32 %size,
; CHECK-NEXT: ret void
entry:
%a = alloca [42 x i8]
- %ptr = getelementptr [42 x i8]* %a, i32 0, i32 0
+ %ptr = getelementptr [42 x i8], [42 x i8]* %a, i32 0, i32 0
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %ptr, i8* %src, i32 8, i32 1, i1 false)
- %ptr2 = getelementptr [42 x i8]* %a, i32 0, i32 8
+ %ptr2 = getelementptr [42 x i8], [42 x i8]* %a, i32 0, i32 8
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %ptr2, i8* %src, i32 %size, i32 1, i1 false)
call void @llvm.memset.p0i8.i32(i8* %ptr2, i8 42, i32 %size, i32 1, i1 false)
%cast = bitcast i8* %ptr to i32*
@@ -820,8 +820,8 @@ entry:
%cast1 = bitcast %opaque* %x to i8*
%cast2 = bitcast { i64, i8* }* %a to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %cast2, i8* %cast1, i32 16, i32 1, i1 false)
- %gep = getelementptr inbounds { i64, i8* }* %a, i32 0, i32 0
- %val = load i64* %gep
+ %gep = getelementptr inbounds { i64, i8* }, { i64, i8* }* %a, i32 0, i32 0
+ %val = load i64, i64* %gep
ret i32 undef
}
@@ -836,18 +836,18 @@ define i32 @test20() {
entry:
%a = alloca [3 x i32]
- %gep1 = getelementptr [3 x i32]* %a, i32 0, i32 0
+ %gep1 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i32 0
store i32 1, i32* %gep1
- %gep2.1 = getelementptr [3 x i32]* %a, i32 0, i32 -2
- %gep2.2 = getelementptr i32* %gep2.1, i32 3
+ %gep2.1 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i32 -2
+ %gep2.2 = getelementptr i32, i32* %gep2.1, i32 3
store i32 2, i32* %gep2.2
- %gep3.1 = getelementptr [3 x i32]* %a, i32 0, i32 14
- %gep3.2 = getelementptr i32* %gep3.1, i32 -12
+ %gep3.1 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i32 14
+ %gep3.2 = getelementptr i32, i32* %gep3.1, i32 -12
store i32 3, i32* %gep3.2
- %load1 = load i32* %gep1
- %load2 = load i32* %gep2.2
- %load3 = load i32* %gep3.2
+ %load1 = load i32, i32* %gep1
+ %load2 = load i32, i32* %gep2.2
+ %load3 = load i32, i32* %gep3.2
%sum1 = add i32 %load1, %load2
%sum2 = add i32 %sum1, %load3
ret i32 %sum2
@@ -865,20 +865,20 @@ define i8 @test21() {
entry:
%a = alloca [2305843009213693951 x i8]
- %gep0 = getelementptr [2305843009213693951 x i8]* %a, i64 0, i64 2305843009213693949
+ %gep0 = getelementptr [2305843009213693951 x i8], [2305843009213693951 x i8]* %a, i64 0, i64 2305843009213693949
store i8 255, i8* %gep0
- %gep1 = getelementptr [2305843009213693951 x i8]* %a, i64 0, i64 -9223372036854775807
- %gep2 = getelementptr i8* %gep1, i64 -1
+ %gep1 = getelementptr [2305843009213693951 x i8], [2305843009213693951 x i8]* %a, i64 0, i64 -9223372036854775807
+ %gep2 = getelementptr i8, i8* %gep1, i64 -1
call void @llvm.memset.p0i8.i64(i8* %gep2, i8 0, i64 18446744073709551615, i32 1, i1 false)
- %gep3 = getelementptr i8* %gep1, i64 9223372036854775807
- %gep4 = getelementptr i8* %gep3, i64 9223372036854775807
- %gep5 = getelementptr i8* %gep4, i64 -6917529027641081857
+ %gep3 = getelementptr i8, i8* %gep1, i64 9223372036854775807
+ %gep4 = getelementptr i8, i8* %gep3, i64 9223372036854775807
+ %gep5 = getelementptr i8, i8* %gep4, i64 -6917529027641081857
store i8 255, i8* %gep5
%cast1 = bitcast i8* %gep4 to i32*
store i32 0, i32* %cast1
- %load = load i8* %gep0
- %gep6 = getelementptr i8* %gep0, i32 1
- %load2 = load i8* %gep6
+ %load = load i8, i8* %gep0
+ %gep6 = getelementptr i8, i8* %gep0, i32 1
+ %load2 = load i8, i8* %gep6
%result = or i8 %load, %load2
ret i8 %result
}
@@ -895,7 +895,7 @@ define void @PR13916.1() {
entry:
%a = alloca i8
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a, i8* %a, i32 1, i32 1, i1 false)
- %tmp2 = load i8* %a
+ %tmp2 = load i8, i8* %a
ret void
}
@@ -918,8 +918,8 @@ if.then:
br label %if.end
if.end:
- %gep = getelementptr %PR13916.struct* %a, i32 0, i32 0
- %tmp2 = load i8* %gep
+ %gep = getelementptr %PR13916.struct, %PR13916.struct* %a, i32 0, i32 0
+ %tmp2 = load i8, i8* %gep
ret void
}
@@ -968,7 +968,7 @@ entry:
store double* %c, double** %b
store double* %a, double** %b
store double %x, double* %c
- %ret = load double* %a
+ %ret = load double, double* %a
; CHECK-NOT: store
; CHECK-NOT: load
@@ -987,8 +987,8 @@ define void @PR14034() {
entry:
%a = alloca %PR14034.struct
- %list = getelementptr %PR14034.struct* %a, i32 0, i32 2
- %prev = getelementptr %PR14034.list* %list, i32 0, i32 1
+ %list = getelementptr %PR14034.struct, %PR14034.struct* %a, i32 0, i32 2
+ %prev = getelementptr %PR14034.list, %PR14034.list* %list, i32 0, i32 1
store %PR14034.list* undef, %PR14034.list** %prev
%cast0 = bitcast %PR14034.struct* undef to i8*
%cast1 = bitcast %PR14034.struct* %a to i8*
@@ -1008,31 +1008,31 @@ entry:
; CHECK-NOT: alloca
%wrap1 = insertvalue [1 x { i32 }] undef, i32 %x, 0, 0
- %gep1 = getelementptr { { [1 x { i32 }] } }* %a1, i32 0, i32 0, i32 0
+ %gep1 = getelementptr { { [1 x { i32 }] } }, { { [1 x { i32 }] } }* %a1, i32 0, i32 0, i32 0
store [1 x { i32 }] %wrap1, [1 x { i32 }]* %gep1
- %gep2 = getelementptr { { [1 x { i32 }] } }* %a1, i32 0, i32 0
+ %gep2 = getelementptr { { [1 x { i32 }] } }, { { [1 x { i32 }] } }* %a1, i32 0, i32 0
%ptrcast1 = bitcast { [1 x { i32 }] }* %gep2 to { [1 x { float }] }*
- %load1 = load { [1 x { float }] }* %ptrcast1
+ %load1 = load { [1 x { float }] }, { [1 x { float }] }* %ptrcast1
%unwrap1 = extractvalue { [1 x { float }] } %load1, 0, 0
%wrap2 = insertvalue { {}, { float }, [0 x i8] } undef, { float } %unwrap1, 1
store { {}, { float }, [0 x i8] } %wrap2, { {}, { float }, [0 x i8] }* %a2
- %gep3 = getelementptr { {}, { float }, [0 x i8] }* %a2, i32 0, i32 1, i32 0
+ %gep3 = getelementptr { {}, { float }, [0 x i8] }, { {}, { float }, [0 x i8] }* %a2, i32 0, i32 1, i32 0
%ptrcast2 = bitcast float* %gep3 to <4 x i8>*
- %load3 = load <4 x i8>* %ptrcast2
+ %load3 = load <4 x i8>, <4 x i8>* %ptrcast2
%valcast1 = bitcast <4 x i8> %load3 to i32
%wrap3 = insertvalue [1 x [1 x i32]] undef, i32 %valcast1, 0, 0
%wrap4 = insertvalue { [1 x [1 x i32]], {} } undef, [1 x [1 x i32]] %wrap3, 0
- %gep4 = getelementptr { [0 x i8], { [0 x double], [1 x [1 x <4 x i8>]], {} }, { { {} } } }* %a3, i32 0, i32 1
+ %gep4 = getelementptr { [0 x i8], { [0 x double], [1 x [1 x <4 x i8>]], {} }, { { {} } } }, { [0 x i8], { [0 x double], [1 x [1 x <4 x i8>]], {} }, { { {} } } }* %a3, i32 0, i32 1
%ptrcast3 = bitcast { [0 x double], [1 x [1 x <4 x i8>]], {} }* %gep4 to { [1 x [1 x i32]], {} }*
store { [1 x [1 x i32]], {} } %wrap4, { [1 x [1 x i32]], {} }* %ptrcast3
- %gep5 = getelementptr { [0 x i8], { [0 x double], [1 x [1 x <4 x i8>]], {} }, { { {} } } }* %a3, i32 0, i32 1, i32 1, i32 0
+ %gep5 = getelementptr { [0 x i8], { [0 x double], [1 x [1 x <4 x i8>]], {} }, { { {} } } }, { [0 x i8], { [0 x double], [1 x [1 x <4 x i8>]], {} }, { { {} } } }* %a3, i32 0, i32 1, i32 1, i32 0
%ptrcast4 = bitcast [1 x <4 x i8>]* %gep5 to { {}, float, {} }*
- %load4 = load { {}, float, {} }* %ptrcast4
+ %load4 = load { {}, float, {} }, { {}, float, {} }* %ptrcast4
%unwrap2 = extractvalue { {}, float, {} } %load4, 1
%valcast2 = bitcast float %unwrap2 to i32
@@ -1064,14 +1064,14 @@ entry:
store i32 0, i32* %X.sroa.0.0.cast2.i, align 8
; Also use a memset to the middle 32-bits for fun.
- %X.sroa.0.2.raw_idx2.i = getelementptr inbounds i8* %0, i32 2
+ %X.sroa.0.2.raw_idx2.i = getelementptr inbounds i8, i8* %0, i32 2
call void @llvm.memset.p0i8.i64(i8* %X.sroa.0.2.raw_idx2.i, i8 0, i64 4, i32 1, i1 false)
; Or a memset of the whole thing.
call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 8, i32 1, i1 false)
; Write to the high 32-bits with a memcpy.
- %X.sroa.0.4.raw_idx4.i = getelementptr inbounds i8* %0, i32 4
+ %X.sroa.0.4.raw_idx4.i = getelementptr inbounds i8, i8* %0, i32 4
%d.raw = bitcast double* %d to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %X.sroa.0.4.raw_idx4.i, i8* %d.raw, i32 4, i32 1, i1 false)
@@ -1080,8 +1080,8 @@ entry:
store i32 1072693248, i32* %X.sroa.0.4.cast5.i, align 4
; Do the actual math...
- %X.sroa.0.0.load1.i = load double* %X.sroa.0.i, align 8
- %accum.real.i = load double* %d, align 8
+ %X.sroa.0.0.load1.i = load double, double* %X.sroa.0.i, align 8
+ %accum.real.i = load double, double* %d, align 8
%add.r.i = fadd double %accum.real.i, %X.sroa.0.0.load1.i
store double %add.r.i, double* %d, align 8
call void @llvm.lifetime.end(i64 -1, i8* %0)
@@ -1103,17 +1103,17 @@ entry:
store i64 0, i64* %0
; CHECK-NOT: store
- %phi.realp = getelementptr inbounds { float, float }* %phi, i32 0, i32 0
- %phi.real = load float* %phi.realp
- %phi.imagp = getelementptr inbounds { float, float }* %phi, i32 0, i32 1
- %phi.imag = load float* %phi.imagp
- ; CHECK: %[[realp:.*]] = getelementptr inbounds { float, float }* %phi, i32 0, i32 0
- ; CHECK-NEXT: %[[real:.*]] = load float* %[[realp]]
- ; CHECK-NEXT: %[[imagp:.*]] = getelementptr inbounds { float, float }* %phi, i32 0, i32 1
- ; CHECK-NEXT: %[[imag:.*]] = load float* %[[imagp]]
-
- %real = getelementptr inbounds { float, float }* %retval, i32 0, i32 0
- %imag = getelementptr inbounds { float, float }* %retval, i32 0, i32 1
+ %phi.realp = getelementptr inbounds { float, float }, { float, float }* %phi, i32 0, i32 0
+ %phi.real = load float, float* %phi.realp
+ %phi.imagp = getelementptr inbounds { float, float }, { float, float }* %phi, i32 0, i32 1
+ %phi.imag = load float, float* %phi.imagp
+ ; CHECK: %[[realp:.*]] = getelementptr inbounds { float, float }, { float, float }* %phi, i32 0, i32 0
+ ; CHECK-NEXT: %[[real:.*]] = load float, float* %[[realp]]
+ ; CHECK-NEXT: %[[imagp:.*]] = getelementptr inbounds { float, float }, { float, float }* %phi, i32 0, i32 1
+ ; CHECK-NEXT: %[[imag:.*]] = load float, float* %[[imagp]]
+
+ %real = getelementptr inbounds { float, float }, { float, float }* %retval, i32 0, i32 0
+ %imag = getelementptr inbounds { float, float }, { float, float }* %retval, i32 0, i32 1
store float %phi.real, float* %real
store float %phi.imag, float* %imag
; CHECK-NEXT: %[[real_convert:.*]] = bitcast float %[[real]] to i32
@@ -1126,7 +1126,7 @@ entry:
; CHECK-NEXT: %[[real_mask:.*]] = and i64 %[[imag_insert]], -4294967296
; CHECK-NEXT: %[[real_insert:.*]] = or i64 %[[real_mask]], %[[real_ext]]
- %1 = load i64* %0, align 1
+ %1 = load i64, i64* %0, align 1
ret i64 %1
; CHECK-NEXT: ret i64 %[[real_insert]]
}
@@ -1141,8 +1141,8 @@ entry:
%a = alloca { [16 x i8] }, align 8
; CHECK: alloca [16 x i8], align 8
- %gep = getelementptr inbounds { [16 x i8] }* %ptr, i64 -1
-; CHECK-NEXT: getelementptr inbounds { [16 x i8] }* %ptr, i64 -1, i32 0, i64 0
+ %gep = getelementptr inbounds { [16 x i8] }, { [16 x i8] }* %ptr, i64 -1
+; CHECK-NEXT: getelementptr inbounds { [16 x i8] }, { [16 x i8] }* %ptr, i64 -1, i32 0, i64 0
%cast1 = bitcast { [16 x i8 ] }* %gep to i8*
%cast2 = bitcast { [16 x i8 ] }* %a to i8*
@@ -1159,8 +1159,8 @@ entry:
%a = alloca { [16 x i8] }, align 8
; CHECK: alloca [16 x i8], align 8
- %gep = getelementptr inbounds { [16 x i8] } addrspace(1)* %ptr, i64 -1
-; CHECK-NEXT: getelementptr inbounds { [16 x i8] } addrspace(1)* %ptr, i16 -1, i32 0, i16 0
+ %gep = getelementptr inbounds { [16 x i8] }, { [16 x i8] } addrspace(1)* %ptr, i64 -1
+; CHECK-NEXT: getelementptr inbounds { [16 x i8] }, { [16 x i8] } addrspace(1)* %ptr, i16 -1, i32 0, i16 0
%cast1 = bitcast { [16 x i8 ] } addrspace(1)* %gep to i8 addrspace(1)*
%cast2 = bitcast { [16 x i8 ] }* %a to i8*
@@ -1199,18 +1199,18 @@ entry:
%b.i1 = bitcast <{ i1 }>* %b to i1*
store i1 %x, i1* %b.i1, align 8
%b.i8 = bitcast <{ i1 }>* %b to i8*
- %foo = load i8* %b.i8, align 1
+ %foo = load i8, i8* %b.i8, align 1
; CHECK-NEXT: %[[ext:.*]] = zext i1 %x to i8
; CHECK-NEXT: store i8 %[[ext]], i8* %[[a]], align 8
-; CHECK-NEXT: {{.*}} = load i8* %[[a]], align 8
+; CHECK-NEXT: {{.*}} = load i8, i8* %[[a]], align 8
%a.i8 = bitcast <{ i1 }>* %a to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.i8, i8* %b.i8, i32 1, i32 1, i1 false) nounwind
- %bar = load i8* %a.i8, align 1
- %a.i1 = getelementptr inbounds <{ i1 }>* %a, i32 0, i32 0
- %baz = load i1* %a.i1, align 1
+ %bar = load i8, i8* %a.i8, align 1
+ %a.i1 = getelementptr inbounds <{ i1 }>, <{ i1 }>* %a, i32 0, i32 0
+ %baz = load i1, i1* %a.i1, align 1
; CHECK-NEXT: %[[a_cast:.*]] = bitcast i8* %[[a]] to i1*
-; CHECK-NEXT: {{.*}} = load i1* %[[a_cast]], align 8
+; CHECK-NEXT: {{.*}} = load i1, i1* %[[a_cast]], align 8
ret void
}
@@ -1226,7 +1226,7 @@ entry:
%cast = bitcast <3 x i8>* %a to i32*
store i32 %x, i32* %cast, align 1
- %y = load <3 x i8>* %a, align 4
+ %y = load <3 x i8>, <3 x i8>* %a, align 4
ret <3 x i8> %y
; CHECK: ret <3 x i8>
}
@@ -1242,7 +1242,7 @@ entry:
store <3 x i8> %x, <3 x i8>* %a, align 1
%cast = bitcast <3 x i8>* %a to i32*
- %y = load i32* %cast, align 4
+ %y = load i32, i32* %cast, align 4
ret i32 %y
; CHECK: ret i32
}
@@ -1258,7 +1258,7 @@ entry:
%a.i8 = bitcast i32* %a to i8*
call void @llvm.memset.p0i8.i32(i8* %a.i8, i8 0, i32 %x, i32 1, i1 false)
- %v = load i32* %a
+ %v = load i32, i32* %a
ret i32 %v
}
@@ -1282,36 +1282,36 @@ entry:
]
bb4:
- %src.gep3 = getelementptr inbounds i8* %src, i32 3
- %src.3 = load i8* %src.gep3
- %tmp.gep3 = getelementptr inbounds [4 x i8]* %tmp, i32 0, i32 3
+ %src.gep3 = getelementptr inbounds i8, i8* %src, i32 3
+ %src.3 = load i8, i8* %src.gep3
+ %tmp.gep3 = getelementptr inbounds [4 x i8], [4 x i8]* %tmp, i32 0, i32 3
store i8 %src.3, i8* %tmp.gep3
; CHECK: store i8
br label %bb3
bb3:
- %src.gep2 = getelementptr inbounds i8* %src, i32 2
- %src.2 = load i8* %src.gep2
- %tmp.gep2 = getelementptr inbounds [4 x i8]* %tmp, i32 0, i32 2
+ %src.gep2 = getelementptr inbounds i8, i8* %src, i32 2
+ %src.2 = load i8, i8* %src.gep2
+ %tmp.gep2 = getelementptr inbounds [4 x i8], [4 x i8]* %tmp, i32 0, i32 2
store i8 %src.2, i8* %tmp.gep2
; CHECK: store i8
br label %bb2
bb2:
- %src.gep1 = getelementptr inbounds i8* %src, i32 1
- %src.1 = load i8* %src.gep1
- %tmp.gep1 = getelementptr inbounds [4 x i8]* %tmp, i32 0, i32 1
+ %src.gep1 = getelementptr inbounds i8, i8* %src, i32 1
+ %src.1 = load i8, i8* %src.gep1
+ %tmp.gep1 = getelementptr inbounds [4 x i8], [4 x i8]* %tmp, i32 0, i32 1
store i8 %src.1, i8* %tmp.gep1
; CHECK: store i8
br label %bb1
bb1:
- %src.gep0 = getelementptr inbounds i8* %src, i32 0
- %src.0 = load i8* %src.gep0
- %tmp.gep0 = getelementptr inbounds [4 x i8]* %tmp, i32 0, i32 0
+ %src.gep0 = getelementptr inbounds i8, i8* %src, i32 0
+ %src.0 = load i8, i8* %src.gep0
+ %tmp.gep0 = getelementptr inbounds [4 x i8], [4 x i8]* %tmp, i32 0, i32 0
store i8 %src.0, i8* %tmp.gep0
; CHECK: store i8
@@ -1332,7 +1332,7 @@ define void @PR15805(i1 %a, i1 %b) {
%c = alloca i64, align 8
%p.0.c = select i1 undef, i64* %c, i64* %c
%cond.in = select i1 undef, i64* %p.0.c, i64* %c
- %cond = load i64* %cond.in, align 8
+ %cond = load i64, i64* %cond.in, align 8
ret void
}
@@ -1351,7 +1351,7 @@ define void @PR15805.1(i1 %a, i1 %b) {
loop:
%cond.in = select i1 undef, i64* %c, i64* %p.0.c
%p.0.c = select i1 undef, i64* %c, i64* %c
- %cond = load i64* %cond.in, align 8
+ %cond = load i64, i64* %cond.in, align 8
br i1 undef, label %loop, label %exit
exit:
@@ -1373,8 +1373,8 @@ entry:
%b = alloca i32, align 4
%b.cast = bitcast i32* %b to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %b.cast, i8* %a, i32 4, i32 4, i1 true)
- %b.gep = getelementptr inbounds i8* %b.cast, i32 2
- load i8* %b.gep, align 2
+ %b.gep = getelementptr inbounds i8, i8* %b.cast, i32 2
+ load i8, i8* %b.gep, align 2
unreachable
}
@@ -1390,11 +1390,11 @@ define void @PR16651.2() {
entry:
%tv1 = alloca { <2 x float>, <2 x float> }, align 8
- %0 = getelementptr { <2 x float>, <2 x float> }* %tv1, i64 0, i32 1
+ %0 = getelementptr { <2 x float>, <2 x float> }, { <2 x float>, <2 x float> }* %tv1, i64 0, i32 1
store <2 x float> undef, <2 x float>* %0, align 8
- %1 = getelementptr inbounds { <2 x float>, <2 x float> }* %tv1, i64 0, i32 1, i64 0
+ %1 = getelementptr inbounds { <2 x float>, <2 x float> }, { <2 x float>, <2 x float> }* %tv1, i64 0, i32 1, i64 0
%cond105.in.i.i = select i1 undef, float* null, float* %1
- %cond105.i.i = load float* %cond105.in.i.i, align 8
+ %cond105.i.i = load float, float* %cond105.in.i.i, align 8
ret void
}
@@ -1405,8 +1405,8 @@ define void @test23(i32 %x) {
entry:
%a = alloca i32, align 4
store i32 %x, i32* %a, align 4
- %gep1 = getelementptr inbounds i32* %a, i32 1
- %gep0 = getelementptr inbounds i32* %a, i32 0
+ %gep1 = getelementptr inbounds i32, i32* %a, i32 1
+ %gep0 = getelementptr inbounds i32, i32* %a, i32 0
%cast1 = bitcast i32* %gep1 to i8*
%cast0 = bitcast i32* %gep0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %cast1, i8* %cast0, i32 4, i32 1, i1 false)
@@ -1419,7 +1419,7 @@ define void @PR18615() {
; CHECK: ret void
entry:
%f = alloca i8
- %gep = getelementptr i8* %f, i64 -1
+ %gep = getelementptr i8, i8* %f, i64 -1
call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* %gep, i32 1, i32 1, i1 false)
ret void
}
@@ -1427,9 +1427,9 @@ entry:
define void @test24(i8* %src, i8* %dst) {
; CHECK-LABEL: @test24(
; CHECK: alloca i64, align 16
-; CHECK: load volatile i64* %{{[^,]*}}, align 1
+; CHECK: load volatile i64, i64* %{{[^,]*}}, align 1
; CHECK: store volatile i64 %{{[^,]*}}, i64* %{{[^,]*}}, align 16
-; CHECK: load volatile i64* %{{[^,]*}}, align 16
+; CHECK: load volatile i64, i64* %{{[^,]*}}, align 16
; CHECK: store volatile i64 %{{[^,]*}}, i64* %{{[^,]*}}, align 1
entry:
@@ -1459,17 +1459,17 @@ entry:
%a = alloca i64
%b = alloca i64
%a.cast = bitcast i64* %a to [2 x float]*
- %a.gep1 = getelementptr [2 x float]* %a.cast, i32 0, i32 0
- %a.gep2 = getelementptr [2 x float]* %a.cast, i32 0, i32 1
+ %a.gep1 = getelementptr [2 x float], [2 x float]* %a.cast, i32 0, i32 0
+ %a.gep2 = getelementptr [2 x float], [2 x float]* %a.cast, i32 0, i32 1
%b.cast = bitcast i64* %b to [2 x float]*
- %b.gep1 = getelementptr [2 x float]* %b.cast, i32 0, i32 0
- %b.gep2 = getelementptr [2 x float]* %b.cast, i32 0, i32 1
+ %b.gep1 = getelementptr [2 x float], [2 x float]* %b.cast, i32 0, i32 0
+ %b.gep2 = getelementptr [2 x float], [2 x float]* %b.cast, i32 0, i32 1
store float 0.0, float* %a.gep1
store float 1.0, float* %a.gep2
- %v = load i64* %a
+ %v = load i64, i64* %a
store i64 %v, i64* %b
- %f1 = load float* %b.gep1
- %f2 = load float* %b.gep2
+ %f1 = load float, float* %b.gep1
+ %f2 = load float, float* %b.gep2
%ret = fadd float %f1, %f2
ret float %ret
}
@@ -1482,8 +1482,8 @@ define void @test26() {
;
; CHECK-LABEL: @test26(
; CHECK-NOT: alloca
-; CHECK: %[[L1:.*]] = load i32* bitcast
-; CHECK: %[[L2:.*]] = load i32* bitcast
+; CHECK: %[[L1:.*]] = load i32, i32* bitcast
+; CHECK: %[[L2:.*]] = load i32, i32* bitcast
; CHECK: %[[F1:.*]] = bitcast i32 %[[L1]] to float
; CHECK: %[[F2:.*]] = bitcast i32 %[[L2]] to float
; CHECK: %[[SUM:.*]] = fadd float %[[F1]], %[[F2]]
@@ -1496,16 +1496,16 @@ define void @test26() {
entry:
%a = alloca i64
%a.cast = bitcast i64* %a to [2 x float]*
- %a.gep1 = getelementptr [2 x float]* %a.cast, i32 0, i32 0
- %a.gep2 = getelementptr [2 x float]* %a.cast, i32 0, i32 1
- %v1 = load i64* bitcast ([2 x float]* @complex1 to i64*)
+ %a.gep1 = getelementptr [2 x float], [2 x float]* %a.cast, i32 0, i32 0
+ %a.gep2 = getelementptr [2 x float], [2 x float]* %a.cast, i32 0, i32 1
+ %v1 = load i64, i64* bitcast ([2 x float]* @complex1 to i64*)
store i64 %v1, i64* %a
- %f1 = load float* %a.gep1
- %f2 = load float* %a.gep2
+ %f1 = load float, float* %a.gep1
+ %f2 = load float, float* %a.gep2
%sum = fadd float %f1, %f2
store float %sum, float* %a.gep1
store float %sum, float* %a.gep2
- %v2 = load i64* %a
+ %v2 = load i64, i64* %a
store i64 %v2, i64* bitcast ([2 x float]* @complex2 to i64*)
ret void
}
@@ -1524,9 +1524,9 @@ define float @test27() {
entry:
%a = alloca [12 x i8]
- %gep1 = getelementptr [12 x i8]* %a, i32 0, i32 0
- %gep2 = getelementptr [12 x i8]* %a, i32 0, i32 4
- %gep3 = getelementptr [12 x i8]* %a, i32 0, i32 8
+ %gep1 = getelementptr [12 x i8], [12 x i8]* %a, i32 0, i32 0
+ %gep2 = getelementptr [12 x i8], [12 x i8]* %a, i32 0, i32 4
+ %gep3 = getelementptr [12 x i8], [12 x i8]* %a, i32 0, i32 8
%iptr1 = bitcast i8* %gep1 to i64*
%iptr2 = bitcast i8* %gep2 to i64*
%fptr1 = bitcast i8* %gep1 to float*
@@ -1534,10 +1534,10 @@ entry:
%fptr3 = bitcast i8* %gep3 to float*
store float 0.0, float* %fptr1
store float 1.0, float* %fptr2
- %v = load i64* %iptr1
+ %v = load i64, i64* %iptr1
store i64 %v, i64* %iptr2
- %f1 = load float* %fptr2
- %f2 = load float* %fptr3
+ %f1 = load float, float* %fptr2
+ %f2 = load float, float* %fptr3
%ret = fadd float %f1, %f2
ret float %ret
}
@@ -1560,7 +1560,7 @@ entry:
%a = alloca i32
%a.cast = bitcast i32* %a to i16*
store volatile i16 42, i16* %a.cast
- %load = load i32* %a
+ %load = load i32, i32* %a
store i32 %load, i32* %a
ret i32 %load
}
@@ -1587,9 +1587,9 @@ entry:
%a.cast1 = bitcast i64* %a to i32*
%a.cast2 = bitcast i64* %a to i16*
store volatile i16 42, i16* %a.cast2
- %load = load i32* %a.cast1
+ %load = load i32, i32* %a.cast1
store i32 %load, i32* %a.cast1
- %a.gep1 = getelementptr i32* %a.cast1, i32 1
+ %a.gep1 = getelementptr i32, i32* %a.cast1, i32 1
%a.cast3 = bitcast i32* %a.gep1 to i8*
store volatile i8 13, i8* %a.cast3
store i32 %load, i32* %a.gep1
diff --git a/test/Transforms/SROA/big-endian.ll b/test/Transforms/SROA/big-endian.ll
index 9e87a9f..b5a04ca 100644
--- a/test/Transforms/SROA/big-endian.ll
+++ b/test/Transforms/SROA/big-endian.ll
@@ -16,14 +16,14 @@ entry:
%b = alloca [3 x i8]
; CHECK-NOT: alloca
- %a0ptr = getelementptr [3 x i8]* %a, i64 0, i32 0
+ %a0ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 0
store i8 0, i8* %a0ptr
- %a1ptr = getelementptr [3 x i8]* %a, i64 0, i32 1
+ %a1ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 1
store i8 0, i8* %a1ptr
- %a2ptr = getelementptr [3 x i8]* %a, i64 0, i32 2
+ %a2ptr = getelementptr [3 x i8], [3 x i8]* %a, i64 0, i32 2
store i8 0, i8* %a2ptr
%aiptr = bitcast [3 x i8]* %a to i24*
- %ai = load i24* %aiptr
+ %ai = load i24, i24* %aiptr
; CHECK-NOT: store
; CHECK-NOT: load
; CHECK: %[[ext2:.*]] = zext i8 0 to i24
@@ -40,12 +40,12 @@ entry:
%biptr = bitcast [3 x i8]* %b to i24*
store i24 %ai, i24* %biptr
- %b0ptr = getelementptr [3 x i8]* %b, i64 0, i32 0
- %b0 = load i8* %b0ptr
- %b1ptr = getelementptr [3 x i8]* %b, i64 0, i32 1
- %b1 = load i8* %b1ptr
- %b2ptr = getelementptr [3 x i8]* %b, i64 0, i32 2
- %b2 = load i8* %b2ptr
+ %b0ptr = getelementptr [3 x i8], [3 x i8]* %b, i64 0, i32 0
+ %b0 = load i8, i8* %b0ptr
+ %b1ptr = getelementptr [3 x i8], [3 x i8]* %b, i64 0, i32 1
+ %b1 = load i8, i8* %b1ptr
+ %b2ptr = getelementptr [3 x i8], [3 x i8]* %b, i64 0, i32 2
+ %b2 = load i8, i8* %b2ptr
; CHECK-NOT: store
; CHECK-NOT: load
; CHECK: %[[shift0:.*]] = lshr i24 %[[insert0]], 16
@@ -72,10 +72,10 @@ entry:
%a = alloca [7 x i8]
; CHECK-NOT: alloca
- %a0ptr = getelementptr [7 x i8]* %a, i64 0, i32 0
- %a1ptr = getelementptr [7 x i8]* %a, i64 0, i32 1
- %a2ptr = getelementptr [7 x i8]* %a, i64 0, i32 2
- %a3ptr = getelementptr [7 x i8]* %a, i64 0, i32 3
+ %a0ptr = getelementptr [7 x i8], [7 x i8]* %a, i64 0, i32 0
+ %a1ptr = getelementptr [7 x i8], [7 x i8]* %a, i64 0, i32 1
+ %a2ptr = getelementptr [7 x i8], [7 x i8]* %a, i64 0, i32 2
+ %a3ptr = getelementptr [7 x i8], [7 x i8]* %a, i64 0, i32 3
; CHECK-NOT: store
; CHECK-NOT: load
@@ -102,7 +102,7 @@ entry:
; CHECK-NOT: load
%aiptr = bitcast [7 x i8]* %a to i56*
- %ai = load i56* %aiptr
+ %ai = load i56, i56* %aiptr
%ret = zext i56 %ai to i64
ret i64 %ret
; CHECK-NEXT: %[[ext4:.*]] = zext i16 1 to i56
diff --git a/test/Transforms/SROA/fca.ll b/test/Transforms/SROA/fca.ll
index e8b4c6c..6eaa73f 100644
--- a/test/Transforms/SROA/fca.ll
+++ b/test/Transforms/SROA/fca.ll
@@ -14,12 +14,12 @@ entry:
store { i32, i32 } undef, { i32, i32 }* %a
- %gep1 = getelementptr inbounds { i32, i32 }* %a, i32 0, i32 0
+ %gep1 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %a, i32 0, i32 0
store i32 %x, i32* %gep1
- %gep2 = getelementptr inbounds { i32, i32 }* %a, i32 0, i32 1
+ %gep2 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %a, i32 0, i32 1
store i32 %y, i32* %gep2
- %result = load { i32, i32 }* %a
+ %result = load { i32, i32 }, { i32, i32 }* %a
ret { i32, i32 } %result
}
@@ -30,7 +30,7 @@ define { i32, i32 } @test1(i32 %x, i32 %y) {
; CHECK-LABEL: @test1(
; CHECK: alloca
; CHECK: alloca
-; CHECK: load volatile { i32, i32 }*
+; CHECK: load volatile { i32, i32 }, { i32, i32 }*
; CHECK: store volatile { i32, i32 }
; CHECK: ret { i32, i32 }
@@ -38,12 +38,12 @@ entry:
%a = alloca { i32, i32 }
%b = alloca { i32, i32 }
- %gep1 = getelementptr inbounds { i32, i32 }* %a, i32 0, i32 0
+ %gep1 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %a, i32 0, i32 0
store i32 %x, i32* %gep1
- %gep2 = getelementptr inbounds { i32, i32 }* %a, i32 0, i32 1
+ %gep2 = getelementptr inbounds { i32, i32 }, { i32, i32 }* %a, i32 0, i32 1
store i32 %y, i32* %gep2
- %result = load volatile { i32, i32 }* %a
+ %result = load volatile { i32, i32 }, { i32, i32 }* %a
store volatile { i32, i32 } %result, { i32, i32 }* %b
ret { i32, i32 } %result
}
diff --git a/test/Transforms/SROA/phi-and-select.ll b/test/Transforms/SROA/phi-and-select.ll
index f287012..e97bd66 100644
--- a/test/Transforms/SROA/phi-and-select.ll
+++ b/test/Transforms/SROA/phi-and-select.ll
@@ -7,12 +7,12 @@ entry:
%a = alloca [2 x i32]
; CHECK-NOT: alloca
- %a0 = getelementptr [2 x i32]* %a, i64 0, i32 0
- %a1 = getelementptr [2 x i32]* %a, i64 0, i32 1
+ %a0 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 0
+ %a1 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 1
store i32 0, i32* %a0
store i32 1, i32* %a1
- %v0 = load i32* %a0
- %v1 = load i32* %a1
+ %v0 = load i32, i32* %a0
+ %v1 = load i32, i32* %a1
; CHECK-NOT: store
; CHECK-NOT: load
@@ -26,7 +26,7 @@ exit:
%phi = phi i32* [ %a1, %then ], [ %a0, %entry ]
; CHECK: phi i32 [ 1, %{{.*}} ], [ 0, %{{.*}} ]
- %result = load i32* %phi
+ %result = load i32, i32* %phi
ret i32 %result
}
@@ -36,12 +36,12 @@ entry:
%a = alloca [2 x i32]
; CHECK-NOT: alloca
- %a0 = getelementptr [2 x i32]* %a, i64 0, i32 0
- %a1 = getelementptr [2 x i32]* %a, i64 0, i32 1
+ %a0 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 0
+ %a1 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 1
store i32 0, i32* %a0
store i32 1, i32* %a1
- %v0 = load i32* %a0
- %v1 = load i32* %a1
+ %v0 = load i32, i32* %a0
+ %v1 = load i32, i32* %a1
; CHECK-NOT: store
; CHECK-NOT: load
@@ -49,7 +49,7 @@ entry:
%select = select i1 %cond, i32* %a1, i32* %a0
; CHECK: select i1 %{{.*}}, i32 1, i32 0
- %result = load i32* %select
+ %result = load i32, i32* %select
ret i32 %result
}
@@ -62,10 +62,10 @@ entry:
; Note that we build redundant GEPs here to ensure that having different GEPs
; into the same alloca partation continues to work with PHI speculation. This
; was the underlying cause of PR13926.
- %a0 = getelementptr [2 x i32]* %a, i64 0, i32 0
- %a0b = getelementptr [2 x i32]* %a, i64 0, i32 0
- %a1 = getelementptr [2 x i32]* %a, i64 0, i32 1
- %a1b = getelementptr [2 x i32]* %a, i64 0, i32 1
+ %a0 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 0
+ %a0b = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 0
+ %a1 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 1
+ %a1b = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 1
store i32 0, i32* %a0
store i32 1, i32* %a1
; CHECK-NOT: store
@@ -100,7 +100,7 @@ exit:
[ %a1b, %bb4 ], [ %a0b, %bb5 ], [ %a0b, %bb6 ], [ %a1b, %bb7 ]
; CHECK: phi i32 [ 1, %{{.*}} ], [ 0, %{{.*}} ], [ 0, %{{.*}} ], [ 1, %{{.*}} ], [ 1, %{{.*}} ], [ 0, %{{.*}} ], [ 0, %{{.*}} ], [ 1, %{{.*}} ]
- %result = load i32* %phi
+ %result = load i32, i32* %phi
ret i32 %result
}
@@ -110,12 +110,12 @@ entry:
%a = alloca [2 x i32]
; CHECK-NOT: alloca
- %a0 = getelementptr [2 x i32]* %a, i64 0, i32 0
- %a1 = getelementptr [2 x i32]* %a, i64 0, i32 1
+ %a0 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 0
+ %a1 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 1
store i32 0, i32* %a0
store i32 1, i32* %a1
- %v0 = load i32* %a0
- %v1 = load i32* %a1
+ %v0 = load i32, i32* %a0
+ %v1 = load i32, i32* %a1
; CHECK-NOT: store
; CHECK-NOT: load
@@ -123,7 +123,7 @@ entry:
%select = select i1 %cond, i32* %a0, i32* %a0
; CHECK-NOT: select
- %result = load i32* %select
+ %result = load i32, i32* %select
ret i32 %result
; CHECK: ret i32 0
}
@@ -134,14 +134,14 @@ entry:
%a = alloca [2 x i32]
; CHECK-NOT: alloca
- %a1 = getelementptr [2 x i32]* %a, i64 0, i32 1
+ %a1 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 1
store i32 1, i32* %a1
; CHECK-NOT: store
%select = select i1 true, i32* %a1, i32* %b
; CHECK-NOT: select
- %result = load i32* %select
+ %result = load i32, i32* %select
; CHECK-NOT: load
ret i32 %result
@@ -157,7 +157,7 @@ entry:
%c = alloca i32
; CHECK-NOT: alloca
- %a1 = getelementptr [2 x i32]* %a, i64 0, i32 1
+ %a1 = getelementptr [2 x i32], [2 x i32]* %a, i64 0, i32 1
store i32 1, i32* %a1
%select = select i1 true, i32* %a1, i32* %b
@@ -172,10 +172,10 @@ entry:
; CHECK: call void @f(i32* %[[select2]], i32* %[[select3]])
- %result = load i32* %select
+ %result = load i32, i32* %select
; CHECK-NOT: load
- %dead = load i32* %c
+ %dead = load i32, i32* %c
ret i32 %result
; CHECK: ret i32 1
@@ -190,19 +190,19 @@ entry:
br i1 undef, label %good, label %bad
good:
- %Y1 = getelementptr i32* %X, i64 0
+ %Y1 = getelementptr i32, i32* %X, i64 0
store i32 0, i32* %Y1
br label %exit
bad:
- %Y2 = getelementptr i32* %X, i64 1
+ %Y2 = getelementptr i32, i32* %X, i64 1
store i32 0, i32* %Y2
br label %exit
exit:
%P = phi i32* [ %Y1, %good ], [ %Y2, %bad ]
; CHECK: %[[phi:.*]] = phi i32 [ 0, %good ],
- %Z2 = load i32* %P
+ %Z2 = load i32, i32* %P
ret i32 %Z2
; CHECK: ret i32 %[[phi]]
}
@@ -213,7 +213,7 @@ define i32 @test8(i32 %b, i32* %ptr) {
; CHECK-LABEL: @test8(
; CHECK-NOT: alloca
; CHECK-NOT: load
-; CHECK: %[[value:.*]] = load i32* %ptr
+; CHECK: %[[value:.*]] = load i32, i32* %ptr
; CHECK-NOT: load
; CHECK: %[[result:.*]] = phi i32 [ undef, %else ], [ %[[value]], %then ]
; CHECK-NEXT: ret i32 %[[result]]
@@ -232,7 +232,7 @@ else:
exit:
%phi = phi i32* [ %bitcast, %else ], [ %ptr, %then ]
- %loaded = load i32* %phi, align 4
+ %loaded = load i32, i32* %phi, align 4
ret i32 %loaded
}
@@ -241,7 +241,7 @@ define i32 @test9(i32 %b, i32* %ptr) {
; CHECK-LABEL: @test9(
; CHECK-NOT: alloca
; CHECK-NOT: load
-; CHECK: %[[value:.*]] = load i32* %ptr
+; CHECK: %[[value:.*]] = load i32, i32* %ptr
; CHECK-NOT: load
; CHECK: %[[result:.*]] = select i1 %{{.*}}, i32 undef, i32 %[[value]]
; CHECK-NEXT: ret i32 %[[result]]
@@ -252,7 +252,7 @@ entry:
%test = icmp ne i32 %b, 0
%bitcast = bitcast float* %f to i32*
%select = select i1 %test, i32* %bitcast, i32* %ptr
- %loaded = load i32* %select, align 4
+ %loaded = load i32, i32* %select, align 4
ret i32 %loaded
}
@@ -262,9 +262,9 @@ define float @test10(i32 %b, float* %ptr) {
; node.
; CHECK-LABEL: @test10(
; CHECK: %[[alloca:.*]] = alloca
-; CHECK: %[[argvalue:.*]] = load float* %ptr
+; CHECK: %[[argvalue:.*]] = load float, float* %ptr
; CHECK: %[[cast:.*]] = bitcast double* %[[alloca]] to float*
-; CHECK: %[[allocavalue:.*]] = load float* %[[cast]]
+; CHECK: %[[allocavalue:.*]] = load float, float* %[[cast]]
; CHECK: %[[result:.*]] = phi float [ %[[allocavalue]], %else ], [ %[[argvalue]], %then ]
; CHECK-NEXT: ret float %[[result]]
@@ -283,7 +283,7 @@ else:
exit:
%phi = phi float* [ %bitcast, %else ], [ %ptr, %then ]
- %loaded = load float* %phi, align 4
+ %loaded = load float, float* %phi, align 4
ret float %loaded
}
@@ -292,8 +292,8 @@ define float @test11(i32 %b, float* %ptr) {
; CHECK-LABEL: @test11(
; CHECK: %[[alloca:.*]] = alloca
; CHECK: %[[cast:.*]] = bitcast double* %[[alloca]] to float*
-; CHECK: %[[allocavalue:.*]] = load float* %[[cast]]
-; CHECK: %[[argvalue:.*]] = load float* %ptr
+; CHECK: %[[allocavalue:.*]] = load float, float* %[[cast]]
+; CHECK: %[[argvalue:.*]] = load float, float* %ptr
; CHECK: %[[result:.*]] = select i1 %{{.*}}, float %[[allocavalue]], float %[[argvalue]]
; CHECK-NEXT: ret float %[[result]]
@@ -304,7 +304,7 @@ entry:
%test = icmp ne i32 %b, 0
%bitcast = bitcast double* %f to float*
%select = select i1 %test, float* %bitcast, float* %ptr
- %loaded = load float* %select, align 4
+ %loaded = load float, float* %select, align 4
ret float %loaded
}
@@ -320,7 +320,7 @@ entry:
%a = alloca i32
store i32 %x, i32* %a
%dead = select i1 undef, i32* %a, i32* %p
- %load = load i32* %a
+ %load = load i32, i32* %a
ret i32 %load
}
@@ -342,7 +342,7 @@ loop:
br i1 undef, label %loop, label %exit
exit:
- %load = load i32* %a
+ %load = load i32, i32* %a
ret i32 %load
}
@@ -376,9 +376,9 @@ else:
exit:
%f.phi = phi i32* [ %f, %then ], [ %f.select, %else ]
%g.phi = phi i32* [ %g, %then ], [ %ptr, %else ]
- %f.loaded = load i32* %f.phi
+ %f.loaded = load i32, i32* %f.phi
%g.select = select i1 %b1, i32* %g, i32* %g.phi
- %g.loaded = load i32* %g.select
+ %g.loaded = load i32, i32* %g.select
%result = add i32 %f.loaded, %g.loaded
ret i32 %result
}
@@ -456,8 +456,8 @@ if.then:
; CHECK: %[[ext:.*]] = zext i8 1 to i64
if.end:
- %tmp = load i64** %ptr
- %result = load i64* %tmp
+ %tmp = load i64*, i64** %ptr
+ %result = load i64, i64* %tmp
; CHECK-NOT: load
; CHECK: %[[result:.*]] = phi i64 [ %[[ext]], %if.then ], [ 0, %entry ]
@@ -488,14 +488,14 @@ then:
else:
%a.raw = bitcast i64* %a to i8*
- %a.raw.4 = getelementptr i8* %a.raw, i64 4
+ %a.raw.4 = getelementptr i8, i8* %a.raw, i64 4
%a.raw.4.f = bitcast i8* %a.raw.4 to float*
br label %end
; CHECK: %[[hi_cast:.*]] = bitcast i32 %[[hi]] to float
end:
%a.phi.f = phi float* [ %a.f, %then ], [ %a.raw.4.f, %else ]
- %f = load float* %a.phi.f
+ %f = load float, float* %a.phi.f
ret float %f
; CHECK: %[[phi:.*]] = phi float [ %[[lo_cast]], %then ], [ %[[hi_cast]], %else ]
; CHECK-NOT: load
@@ -516,19 +516,19 @@ entry:
br i1 %cond, label %then, label %else
then:
- %0 = getelementptr inbounds [4 x float]* %arr, i64 0, i64 3
+ %0 = getelementptr inbounds [4 x float], [4 x float]* %arr, i64 0, i64 3
store float 1.000000e+00, float* %0, align 4
br label %merge
else:
- %1 = getelementptr inbounds [4 x float]* %arr, i64 0, i64 3
+ %1 = getelementptr inbounds [4 x float], [4 x float]* %arr, i64 0, i64 3
store float 2.000000e+00, float* %1, align 4
br label %merge
merge:
%2 = phi float* [ %0, %then ], [ %1, %else ]
store float 0.000000e+00, float* %temp, align 4
- %3 = load float* %2, align 4
+ %3 = load float, float* %2, align 4
ret float %3
}
@@ -546,7 +546,7 @@ entry:
br i1 %cond, label %then, label %else
then:
- %0 = getelementptr inbounds [4 x float]* %arr, i64 0, i64 3
+ %0 = getelementptr inbounds [4 x float], [4 x float]* %arr, i64 0, i64 3
store float 1.000000e+00, float* %0, align 4
br label %then2
@@ -556,14 +556,14 @@ then2:
br label %merge
else:
- %2 = getelementptr inbounds [4 x float]* %arr, i64 0, i64 3
+ %2 = getelementptr inbounds [4 x float], [4 x float]* %arr, i64 0, i64 3
store float 3.000000e+00, float* %2, align 4
br label %merge
merge:
%3 = phi float* [ %1, %then2 ], [ %2, %else ]
store float 0.000000e+00, float* %temp, align 4
- %4 = load float* %3, align 4
+ %4 = load float, float* %3, align 4
ret float %4
}
diff --git a/test/Transforms/SROA/slice-order-independence.ll b/test/Transforms/SROA/slice-order-independence.ll
index 364ef85..7d57be6 100644
--- a/test/Transforms/SROA/slice-order-independence.ll
+++ b/test/Transforms/SROA/slice-order-independence.ll
@@ -13,11 +13,11 @@ define void @skipped_inttype_first({ i16*, i32 }*) {
%2 = bitcast { i16*, i32 }* %0 to i8*
%3 = bitcast { i16*, i32 }* %arg to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %3, i8* %2, i32 16, i32 8, i1 false)
- %b = getelementptr inbounds { i16*, i32 }* %arg, i64 0, i32 0
+ %b = getelementptr inbounds { i16*, i32 }, { i16*, i32 }* %arg, i64 0, i32 0
%pb0 = bitcast i16** %b to i63*
- %b0 = load i63* %pb0
+ %b0 = load i63, i63* %pb0
%pb1 = bitcast i16** %b to i8**
- %b1 = load i8** %pb1
+ %b1 = load i8*, i8** %pb1
ret void
}
@@ -28,10 +28,10 @@ define void @skipped_inttype_last({ i16*, i32 }*) {
%2 = bitcast { i16*, i32 }* %0 to i8*
%3 = bitcast { i16*, i32 }* %arg to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %3, i8* %2, i32 16, i32 8, i1 false)
- %b = getelementptr inbounds { i16*, i32 }* %arg, i64 0, i32 0
+ %b = getelementptr inbounds { i16*, i32 }, { i16*, i32 }* %arg, i64 0, i32 0
%pb1 = bitcast i16** %b to i8**
- %b1 = load i8** %pb1
+ %b1 = load i8*, i8** %pb1
%pb0 = bitcast i16** %b to i63*
- %b0 = load i63* %pb0
+ %b0 = load i63, i63* %pb0
ret void
}
diff --git a/test/Transforms/SROA/slice-width.ll b/test/Transforms/SROA/slice-width.ll
index ff66dcc..6b6ab93 100644
--- a/test/Transforms/SROA/slice-width.ll
+++ b/test/Transforms/SROA/slice-width.ll
@@ -14,14 +14,14 @@ load_i32:
; CHECK-LABEL: load_i32:
; CHECK-NOT: bitcast {{.*}} to i1
; CHECK-NOT: zext i1
- %r0 = load i32* %arg
+ %r0 = load i32, i32* %arg
br label %load_i1
load_i1:
; CHECK-LABEL: load_i1:
; CHECK: bitcast {{.*}} to i1
%p1 = bitcast i32* %arg to i1*
- %t1 = load i1* %p1
+ %t1 = load i1, i1* %p1
ret void
}
@@ -42,16 +42,16 @@ define void @memcpy_fp80_padding() {
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %x_i8, i8* bitcast (%union.Foo* @foo_copy_source to i8*), i32 32, i32 16, i1 false)
; Access a slice of the alloca to trigger SROA.
- %mid_p = getelementptr %union.Foo* %x, i32 0, i32 1
- %elt = load i64* %mid_p
+ %mid_p = getelementptr %union.Foo, %union.Foo* %x, i32 0, i32 1
+ %elt = load i64, i64* %mid_p
store i64 %elt, i64* @i64_sink
ret void
}
; CHECK-LABEL: define void @memcpy_fp80_padding
; CHECK: alloca x86_fp80
; CHECK: call void @llvm.memcpy.p0i8.p0i8.i32
-; CHECK: load i64* getelementptr inbounds (%union.Foo* @foo_copy_source, i64 0, i32 1)
-; CHECK: load i64* getelementptr inbounds (%union.Foo* @foo_copy_source, i64 0, i32 2)
+; CHECK: load i64, i64* getelementptr inbounds (%union.Foo, %union.Foo* @foo_copy_source, i64 0, i32 1)
+; CHECK: load i64, i64* getelementptr inbounds (%union.Foo, %union.Foo* @foo_copy_source, i64 0, i32 2)
define void @memset_fp80_padding() {
%x = alloca %union.Foo
@@ -61,8 +61,8 @@ define void @memset_fp80_padding() {
call void @llvm.memset.p0i8.i32(i8* %x_i8, i8 -1, i32 32, i32 16, i1 false)
; Access a slice of the alloca to trigger SROA.
- %mid_p = getelementptr %union.Foo* %x, i32 0, i32 1
- %elt = load i64* %mid_p
+ %mid_p = getelementptr %union.Foo, %union.Foo* %x, i32 0, i32 1
+ %elt = load i64, i64* %mid_p
store i64 %elt, i64* @i64_sink
ret void
}
@@ -89,8 +89,8 @@ entry:
; The following block does nothing; but appears to confuse SROA
%unused1 = bitcast %S.vec3float* %tmp1 to %U.vec3float*
- %unused2 = getelementptr inbounds %U.vec3float* %unused1, i32 0, i32 0
- %unused3 = load <4 x float>* %unused2, align 1
+ %unused2 = getelementptr inbounds %U.vec3float, %U.vec3float* %unused1, i32 0, i32 0
+ %unused3 = load <4 x float>, <4 x float>* %unused2, align 1
; Create a second temporary and copy %tmp1 into it
%tmp2 = alloca %S.vec3float, align 4
diff --git a/test/Transforms/SROA/vector-conversion.ll b/test/Transforms/SROA/vector-conversion.ll
index 08d7960..91ae5be 100644
--- a/test/Transforms/SROA/vector-conversion.ll
+++ b/test/Transforms/SROA/vector-conversion.ll
@@ -10,7 +10,7 @@ define <4 x i64> @vector_ptrtoint({<2 x i32*>, <2 x i32*>} %x) {
; CHECK-NOT: store
%cast = bitcast {<2 x i32*>, <2 x i32*>}* %a to <4 x i64>*
- %vec = load <4 x i64>* %cast
+ %vec = load <4 x i64>, <4 x i64>* %cast
; CHECK-NOT: load
; CHECK: ptrtoint
@@ -26,7 +26,7 @@ define <4 x i32*> @vector_inttoptr({<2 x i64>, <2 x i64>} %x) {
; CHECK-NOT: store
%cast = bitcast {<2 x i64>, <2 x i64>}* %a to <4 x i32*>*
- %vec = load <4 x i32*>* %cast
+ %vec = load <4 x i32*>, <4 x i32*>* %cast
; CHECK-NOT: load
; CHECK: inttoptr
@@ -42,7 +42,7 @@ define <2 x i64> @vector_ptrtointbitcast({<1 x i32*>, <1 x i32*>} %x) {
; CHECK-NOT: store
%cast = bitcast {<1 x i32*>, <1 x i32*>}* %a to <2 x i64>*
- %vec = load <2 x i64>* %cast
+ %vec = load <2 x i64>, <2 x i64>* %cast
; CHECK-NOT: load
; CHECK: ptrtoint
; CHECK: bitcast
diff --git a/test/Transforms/SROA/vector-lifetime-intrinsic.ll b/test/Transforms/SROA/vector-lifetime-intrinsic.ll
index 30c93b0..37cf394 100644
--- a/test/Transforms/SROA/vector-lifetime-intrinsic.ll
+++ b/test/Transforms/SROA/vector-lifetime-intrinsic.ll
@@ -18,7 +18,7 @@ bb:
call void @llvm.lifetime.start(i64 16, i8* %tmp8)
store <4 x float> %arg1, <4 x float>* %tmp, align 16
%tmp17 = bitcast <4 x float>* %tmp to <3 x float>*
- %tmp18 = load <3 x float>* %tmp17
+ %tmp18 = load <3 x float>, <3 x float>* %tmp17
%tmp20 = bitcast <4 x float>* %tmp to i8*
call void @llvm.lifetime.end(i64 16, i8* %tmp20)
call void @wombat3(<3 x float> %tmp18)
diff --git a/test/Transforms/SROA/vector-promotion.ll b/test/Transforms/SROA/vector-promotion.ll
index c20c635..2d9b26b 100644
--- a/test/Transforms/SROA/vector-promotion.ll
+++ b/test/Transforms/SROA/vector-promotion.ll
@@ -9,18 +9,18 @@ entry:
%a = alloca [2 x <4 x i32>]
; CHECK-NOT: alloca
- %a.x = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0
+ %a.x = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0
store <4 x i32> %x, <4 x i32>* %a.x
- %a.y = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1
+ %a.y = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1
store <4 x i32> %y, <4 x i32>* %a.y
; CHECK-NOT: store
- %a.tmp1 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
- %tmp1 = load i32* %a.tmp1
- %a.tmp2 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
- %tmp2 = load i32* %a.tmp2
- %a.tmp3 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
- %tmp3 = load i32* %a.tmp3
+ %a.tmp1 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
+ %tmp1 = load i32, i32* %a.tmp1
+ %a.tmp2 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
+ %tmp2 = load i32, i32* %a.tmp2
+ %a.tmp3 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
+ %tmp3 = load i32, i32* %a.tmp3
; CHECK-NOT: load
; CHECK: extractelement <4 x i32> %x, i32 2
; CHECK-NEXT: extractelement <4 x i32> %y, i32 3
@@ -40,19 +40,19 @@ entry:
%a = alloca [2 x <4 x i32>]
; CHECK-NOT: alloca
- %a.x = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0
+ %a.x = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0
store <4 x i32> %x, <4 x i32>* %a.x
- %a.y = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1
+ %a.y = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1
store <4 x i32> %y, <4 x i32>* %a.y
; CHECK-NOT: store
- %a.tmp1 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
- %tmp1 = load i32* %a.tmp1
- %a.tmp2 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
- %tmp2 = load i32* %a.tmp2
- %a.tmp3 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
+ %a.tmp1 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
+ %tmp1 = load i32, i32* %a.tmp1
+ %a.tmp2 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
+ %tmp2 = load i32, i32* %a.tmp2
+ %a.tmp3 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
%a.tmp3.cast = bitcast i32* %a.tmp3 to <2 x i32>*
- %tmp3.vec = load <2 x i32>* %a.tmp3.cast
+ %tmp3.vec = load <2 x i32>, <2 x i32>* %a.tmp3.cast
%tmp3 = extractelement <2 x i32> %tmp3.vec, i32 0
; CHECK-NOT: load
; CHECK: %[[extract1:.*]] = extractelement <4 x i32> %x, i32 2
@@ -74,9 +74,9 @@ entry:
%a = alloca [2 x <4 x i32>]
; CHECK-NOT: alloca
- %a.x = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0
+ %a.x = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0
store <4 x i32> %x, <4 x i32>* %a.x
- %a.y = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1
+ %a.y = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1
store <4 x i32> %y, <4 x i32>* %a.y
; CHECK-NOT: store
@@ -84,14 +84,14 @@ entry:
call void @llvm.memset.p0i8.i32(i8* %a.y.cast, i8 0, i32 16, i32 1, i1 false)
; CHECK-NOT: memset
- %a.tmp1 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
+ %a.tmp1 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
%a.tmp1.cast = bitcast i32* %a.tmp1 to i8*
call void @llvm.memset.p0i8.i32(i8* %a.tmp1.cast, i8 -1, i32 4, i32 1, i1 false)
- %tmp1 = load i32* %a.tmp1
- %a.tmp2 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
- %tmp2 = load i32* %a.tmp2
- %a.tmp3 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
- %tmp3 = load i32* %a.tmp3
+ %tmp1 = load i32, i32* %a.tmp1
+ %a.tmp2 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
+ %tmp2 = load i32, i32* %a.tmp2
+ %a.tmp3 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
+ %tmp3 = load i32, i32* %a.tmp3
; CHECK-NOT: load
; CHECK: %[[insert:.*]] = insertelement <4 x i32> %x, i32 -1, i32 2
; CHECK-NEXT: extractelement <4 x i32> %[[insert]], i32 2
@@ -112,9 +112,9 @@ entry:
%a = alloca [2 x <4 x i32>]
; CHECK-NOT: alloca
- %a.x = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0
+ %a.x = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0
store <4 x i32> %x, <4 x i32>* %a.x
- %a.y = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1
+ %a.y = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1
store <4 x i32> %y, <4 x i32>* %a.y
; CHECK-NOT: store
@@ -123,20 +123,20 @@ entry:
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.y.cast, i8* %z.cast, i32 16, i32 1, i1 false)
; CHECK-NOT: memcpy
- %a.tmp1 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
+ %a.tmp1 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
%a.tmp1.cast = bitcast i32* %a.tmp1 to i8*
- %z.tmp1 = getelementptr inbounds <4 x i32>* %z, i64 0, i64 2
+ %z.tmp1 = getelementptr inbounds <4 x i32>, <4 x i32>* %z, i64 0, i64 2
%z.tmp1.cast = bitcast i32* %z.tmp1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.tmp1.cast, i8* %z.tmp1.cast, i32 4, i32 1, i1 false)
- %tmp1 = load i32* %a.tmp1
- %a.tmp2 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
- %tmp2 = load i32* %a.tmp2
- %a.tmp3 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
- %tmp3 = load i32* %a.tmp3
+ %tmp1 = load i32, i32* %a.tmp1
+ %a.tmp2 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
+ %tmp2 = load i32, i32* %a.tmp2
+ %a.tmp3 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
+ %tmp3 = load i32, i32* %a.tmp3
; CHECK-NOT: memcpy
-; CHECK: %[[load:.*]] = load <4 x i32>* %z
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds <4 x i32>* %z, i64 0, i64 2
-; CHECK-NEXT: %[[element_load:.*]] = load i32* %[[gep]]
+; CHECK: %[[load:.*]] = load <4 x i32>, <4 x i32>* %z
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds <4 x i32>, <4 x i32>* %z, i64 0, i64 2
+; CHECK-NEXT: %[[element_load:.*]] = load i32, i32* %[[gep]]
; CHECK-NEXT: %[[insert:.*]] = insertelement <4 x i32> %x, i32 %[[element_load]], i32 2
; CHECK-NEXT: extractelement <4 x i32> %[[insert]], i32 2
; CHECK-NEXT: extractelement <4 x i32> %[[load]], i32 3
@@ -159,9 +159,9 @@ entry:
%a = alloca [2 x <4 x i32>]
; CHECK-NOT: alloca
- %a.x = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0
+ %a.x = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0
store <4 x i32> %x, <4 x i32>* %a.x
- %a.y = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1
+ %a.y = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1
store <4 x i32> %y, <4 x i32>* %a.y
; CHECK-NOT: store
@@ -170,20 +170,20 @@ entry:
call void @llvm.memcpy.p0i8.p1i8.i32(i8* %a.y.cast, i8 addrspace(1)* %z.cast, i32 16, i32 1, i1 false)
; CHECK-NOT: memcpy
- %a.tmp1 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
+ %a.tmp1 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
%a.tmp1.cast = bitcast i32* %a.tmp1 to i8*
- %z.tmp1 = getelementptr inbounds <4 x i32> addrspace(1)* %z, i16 0, i16 2
+ %z.tmp1 = getelementptr inbounds <4 x i32>, <4 x i32> addrspace(1)* %z, i16 0, i16 2
%z.tmp1.cast = bitcast i32 addrspace(1)* %z.tmp1 to i8 addrspace(1)*
call void @llvm.memcpy.p0i8.p1i8.i32(i8* %a.tmp1.cast, i8 addrspace(1)* %z.tmp1.cast, i32 4, i32 1, i1 false)
- %tmp1 = load i32* %a.tmp1
- %a.tmp2 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
- %tmp2 = load i32* %a.tmp2
- %a.tmp3 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
- %tmp3 = load i32* %a.tmp3
+ %tmp1 = load i32, i32* %a.tmp1
+ %a.tmp2 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
+ %tmp2 = load i32, i32* %a.tmp2
+ %a.tmp3 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
+ %tmp3 = load i32, i32* %a.tmp3
; CHECK-NOT: memcpy
-; CHECK: %[[load:.*]] = load <4 x i32> addrspace(1)* %z
-; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds <4 x i32> addrspace(1)* %z, i64 0, i64 2
-; CHECK-NEXT: %[[element_load:.*]] = load i32 addrspace(1)* %[[gep]]
+; CHECK: %[[load:.*]] = load <4 x i32>, <4 x i32> addrspace(1)* %z
+; CHECK-NEXT: %[[gep:.*]] = getelementptr inbounds <4 x i32>, <4 x i32> addrspace(1)* %z, i64 0, i64 2
+; CHECK-NEXT: %[[element_load:.*]] = load i32, i32 addrspace(1)* %[[gep]]
; CHECK-NEXT: %[[insert:.*]] = insertelement <4 x i32> %x, i32 %[[element_load]], i32 2
; CHECK-NEXT: extractelement <4 x i32> %[[insert]], i32 2
; CHECK-NEXT: extractelement <4 x i32> %[[load]], i32 3
@@ -205,9 +205,9 @@ entry:
%a = alloca [2 x <4 x i32>]
; CHECK-NOT: alloca
- %a.x = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0
+ %a.x = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0
store <4 x i32> %x, <4 x i32>* %a.x
- %a.y = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1
+ %a.y = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1
store <4 x i32> %y, <4 x i32>* %a.y
; CHECK-NOT: store
@@ -216,18 +216,18 @@ entry:
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.x.cast, i8* %a.y.cast, i32 16, i32 1, i1 false)
; CHECK-NOT: memcpy
- %a.tmp1 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
+ %a.tmp1 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 0, i64 2
%a.tmp1.cast = bitcast i32* %a.tmp1 to i8*
- %z.tmp1 = getelementptr inbounds <4 x i32>* %z, i64 0, i64 2
+ %z.tmp1 = getelementptr inbounds <4 x i32>, <4 x i32>* %z, i64 0, i64 2
%z.tmp1.cast = bitcast i32* %z.tmp1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %z.tmp1.cast, i8* %a.tmp1.cast, i32 4, i32 1, i1 false)
- %tmp1 = load i32* %a.tmp1
- %a.tmp2 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
- %tmp2 = load i32* %a.tmp2
- %a.tmp3 = getelementptr inbounds [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
- %tmp3 = load i32* %a.tmp3
+ %tmp1 = load i32, i32* %a.tmp1
+ %a.tmp2 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 3
+ %tmp2 = load i32, i32* %a.tmp2
+ %a.tmp3 = getelementptr inbounds [2 x <4 x i32>], [2 x <4 x i32>]* %a, i64 0, i64 1, i64 0
+ %tmp3 = load i32, i32* %a.tmp3
; CHECK-NOT: memcpy
-; CHECK: %[[gep:.*]] = getelementptr inbounds <4 x i32>* %z, i64 0, i64 2
+; CHECK: %[[gep:.*]] = getelementptr inbounds <4 x i32>, <4 x i32>* %z, i64 0, i64 2
; CHECK-NEXT: %[[extract:.*]] = extractelement <4 x i32> %y, i32 2
; CHECK-NEXT: store i32 %[[extract]], i32* %[[gep]]
; CHECK-NEXT: extractelement <4 x i32> %y, i32 2
@@ -250,14 +250,14 @@ define i64 @test6(<4 x i64> %x, <4 x i64> %y, i64 %n) {
; The old scalarrepl pass would wrongly drop the store to the second alloca.
; PR13254
%tmp = alloca { <4 x i64>, <4 x i64> }
- %p0 = getelementptr inbounds { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 0
+ %p0 = getelementptr inbounds { <4 x i64>, <4 x i64> }, { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 0
store <4 x i64> %x, <4 x i64>* %p0
; CHECK: store <4 x i64> %x,
- %p1 = getelementptr inbounds { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 1
+ %p1 = getelementptr inbounds { <4 x i64>, <4 x i64> }, { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 1
store <4 x i64> %y, <4 x i64>* %p1
; CHECK: store <4 x i64> %y,
- %addr = getelementptr inbounds { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 0, i64 %n
- %res = load i64* %addr, align 4
+ %addr = getelementptr inbounds { <4 x i64>, <4 x i64> }, { <4 x i64>, <4 x i64> }* %tmp, i32 0, i32 0, i64 %n
+ %res = load i64, i64* %addr, align 4
ret i64 %res
}
@@ -267,27 +267,27 @@ entry:
%a = alloca <4 x i32>
; CHECK-NOT: alloca
- %a.gep0 = getelementptr <4 x i32>* %a, i32 0, i32 0
+ %a.gep0 = getelementptr <4 x i32>, <4 x i32>* %a, i32 0, i32 0
%a.cast0 = bitcast i32* %a.gep0 to <2 x i32>*
store <2 x i32> <i32 0, i32 0>, <2 x i32>* %a.cast0
; CHECK-NOT: store
; CHECK: select <4 x i1> <i1 true, i1 true, i1 false, i1 false>
- %a.gep1 = getelementptr <4 x i32>* %a, i32 0, i32 1
+ %a.gep1 = getelementptr <4 x i32>, <4 x i32>* %a, i32 0, i32 1
%a.cast1 = bitcast i32* %a.gep1 to <2 x i32>*
store <2 x i32> <i32 1, i32 1>, <2 x i32>* %a.cast1
; CHECK-NEXT: select <4 x i1> <i1 false, i1 true, i1 true, i1 false>
- %a.gep2 = getelementptr <4 x i32>* %a, i32 0, i32 2
+ %a.gep2 = getelementptr <4 x i32>, <4 x i32>* %a, i32 0, i32 2
%a.cast2 = bitcast i32* %a.gep2 to <2 x i32>*
store <2 x i32> <i32 2, i32 2>, <2 x i32>* %a.cast2
; CHECK-NEXT: select <4 x i1> <i1 false, i1 false, i1 true, i1 true>
- %a.gep3 = getelementptr <4 x i32>* %a, i32 0, i32 3
+ %a.gep3 = getelementptr <4 x i32>, <4 x i32>* %a, i32 0, i32 3
store i32 3, i32* %a.gep3
; CHECK-NEXT: insertelement <4 x i32>
- %ret = load <4 x i32>* %a
+ %ret = load <4 x i32>, <4 x i32>* %a
ret <4 x i32> %ret
; CHECK-NEXT: ret <4 x i32>
@@ -301,20 +301,20 @@ entry:
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %a
; CHECK-NOT: store
- %a.gep0 = getelementptr <4 x i32>* %a, i32 0, i32 0
+ %a.gep0 = getelementptr <4 x i32>, <4 x i32>* %a, i32 0, i32 0
%a.cast0 = bitcast i32* %a.gep0 to <2 x i32>*
- %first = load <2 x i32>* %a.cast0
+ %first = load <2 x i32>, <2 x i32>* %a.cast0
; CHECK-NOT: load
; CHECK: %[[extract1:.*]] = shufflevector <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32> undef, <2 x i32> <i32 0, i32 1>
- %a.gep1 = getelementptr <4 x i32>* %a, i32 0, i32 1
+ %a.gep1 = getelementptr <4 x i32>, <4 x i32>* %a, i32 0, i32 1
%a.cast1 = bitcast i32* %a.gep1 to <2 x i32>*
- %second = load <2 x i32>* %a.cast1
+ %second = load <2 x i32>, <2 x i32>* %a.cast1
; CHECK-NEXT: %[[extract2:.*]] = shufflevector <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32> undef, <2 x i32> <i32 1, i32 2>
- %a.gep2 = getelementptr <4 x i32>* %a, i32 0, i32 2
+ %a.gep2 = getelementptr <4 x i32>, <4 x i32>* %a, i32 0, i32 2
%a.cast2 = bitcast i32* %a.gep2 to <2 x i32>*
- %third = load <2 x i32>* %a.cast2
+ %third = load <2 x i32>, <2 x i32>* %a.cast2
; CHECK-NEXT: %[[extract3:.*]] = shufflevector <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32> undef, <2 x i32> <i32 2, i32 3>
%tmp = shufflevector <2 x i32> %first, <2 x i32> %second, <2 x i32> <i32 0, i32 2>
@@ -334,28 +334,28 @@ entry:
%a = alloca <4 x float>
; CHECK-NOT: alloca
- %a.gep0 = getelementptr <4 x float>* %a, i32 0, i32 0
+ %a.gep0 = getelementptr <4 x float>, <4 x float>* %a, i32 0, i32 0
%a.cast0 = bitcast float* %a.gep0 to i8*
call void @llvm.memset.p0i8.i32(i8* %a.cast0, i8 0, i32 8, i32 0, i1 false)
; CHECK-NOT: store
; CHECK: select <4 x i1> <i1 true, i1 true, i1 false, i1 false>
- %a.gep1 = getelementptr <4 x float>* %a, i32 0, i32 1
+ %a.gep1 = getelementptr <4 x float>, <4 x float>* %a, i32 0, i32 1
%a.cast1 = bitcast float* %a.gep1 to i8*
call void @llvm.memset.p0i8.i32(i8* %a.cast1, i8 1, i32 8, i32 0, i1 false)
; CHECK-NEXT: select <4 x i1> <i1 false, i1 true, i1 true, i1 false>
- %a.gep2 = getelementptr <4 x float>* %a, i32 0, i32 2
+ %a.gep2 = getelementptr <4 x float>, <4 x float>* %a, i32 0, i32 2
%a.cast2 = bitcast float* %a.gep2 to i8*
call void @llvm.memset.p0i8.i32(i8* %a.cast2, i8 3, i32 8, i32 0, i1 false)
; CHECK-NEXT: select <4 x i1> <i1 false, i1 false, i1 true, i1 true>
- %a.gep3 = getelementptr <4 x float>* %a, i32 0, i32 3
+ %a.gep3 = getelementptr <4 x float>, <4 x float>* %a, i32 0, i32 3
%a.cast3 = bitcast float* %a.gep3 to i8*
call void @llvm.memset.p0i8.i32(i8* %a.cast3, i8 7, i32 4, i32 0, i1 false)
; CHECK-NEXT: insertelement <4 x float>
- %ret = load <4 x float>* %a
+ %ret = load <4 x float>, <4 x float>* %a
ret <4 x float> %ret
; CHECK-NEXT: ret <4 x float>
@@ -367,35 +367,35 @@ entry:
%a = alloca <4 x float>
; CHECK-NOT: alloca
- %a.gep0 = getelementptr <4 x float>* %a, i32 0, i32 0
+ %a.gep0 = getelementptr <4 x float>, <4 x float>* %a, i32 0, i32 0
%a.cast0 = bitcast float* %a.gep0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.cast0, i8* %x, i32 8, i32 0, i1 false)
; CHECK: %[[xptr:.*]] = bitcast i8* %x to <2 x float>*
-; CHECK-NEXT: %[[x:.*]] = load <2 x float>* %[[xptr]]
+; CHECK-NEXT: %[[x:.*]] = load <2 x float>, <2 x float>* %[[xptr]]
; CHECK-NEXT: %[[expand_x:.*]] = shufflevector <2 x float> %[[x]], <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
; CHECK-NEXT: select <4 x i1> <i1 true, i1 true, i1 false, i1 false>
- %a.gep1 = getelementptr <4 x float>* %a, i32 0, i32 1
+ %a.gep1 = getelementptr <4 x float>, <4 x float>* %a, i32 0, i32 1
%a.cast1 = bitcast float* %a.gep1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.cast1, i8* %y, i32 8, i32 0, i1 false)
; CHECK-NEXT: %[[yptr:.*]] = bitcast i8* %y to <2 x float>*
-; CHECK-NEXT: %[[y:.*]] = load <2 x float>* %[[yptr]]
+; CHECK-NEXT: %[[y:.*]] = load <2 x float>, <2 x float>* %[[yptr]]
; CHECK-NEXT: %[[expand_y:.*]] = shufflevector <2 x float> %[[y]], <2 x float> undef, <4 x i32> <i32 undef, i32 0, i32 1, i32 undef>
; CHECK-NEXT: select <4 x i1> <i1 false, i1 true, i1 true, i1 false>
- %a.gep2 = getelementptr <4 x float>* %a, i32 0, i32 2
+ %a.gep2 = getelementptr <4 x float>, <4 x float>* %a, i32 0, i32 2
%a.cast2 = bitcast float* %a.gep2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.cast2, i8* %z, i32 8, i32 0, i1 false)
; CHECK-NEXT: %[[zptr:.*]] = bitcast i8* %z to <2 x float>*
-; CHECK-NEXT: %[[z:.*]] = load <2 x float>* %[[zptr]]
+; CHECK-NEXT: %[[z:.*]] = load <2 x float>, <2 x float>* %[[zptr]]
; CHECK-NEXT: %[[expand_z:.*]] = shufflevector <2 x float> %[[z]], <2 x float> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 1>
; CHECK-NEXT: select <4 x i1> <i1 false, i1 false, i1 true, i1 true>
- %a.gep3 = getelementptr <4 x float>* %a, i32 0, i32 3
+ %a.gep3 = getelementptr <4 x float>, <4 x float>* %a, i32 0, i32 3
%a.cast3 = bitcast float* %a.gep3 to i8*
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %a.cast3, i8* %f, i32 4, i32 0, i1 false)
; CHECK-NEXT: %[[fptr:.*]] = bitcast i8* %f to float*
-; CHECK-NEXT: %[[f:.*]] = load float* %[[fptr]]
+; CHECK-NEXT: %[[f:.*]] = load float, float* %[[fptr]]
; CHECK-NEXT: %[[insert_f:.*]] = insertelement <4 x float>
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %out, i8* %a.cast2, i32 8, i32 0, i1 false)
@@ -403,7 +403,7 @@ entry:
; CHECK-NEXT: %[[extract_out:.*]] = shufflevector <4 x float> %[[insert_f]], <4 x float> undef, <2 x i32> <i32 2, i32 3>
; CHECK-NEXT: store <2 x float> %[[extract_out]], <2 x float>* %[[outptr]]
- %ret = load <4 x float>* %a
+ %ret = load <4 x float>, <4 x float>* %a
ret <4 x float> %ret
; CHECK-NEXT: ret <4 x float> %[[insert_f]]
@@ -419,7 +419,7 @@ entry:
store <3 x i8> undef, <3 x i8>* %retval, align 4
%cast = bitcast <3 x i8>* %retval to i32*
- %load = load i32* %cast, align 4
+ %load = load i32, i32* %cast, align 4
ret i32 %load
; CHECK: ret i32
}
@@ -437,7 +437,7 @@ entry:
; CHECK-NOT: store
%cast = bitcast i32* %a to <2 x i8>*
- %vec = load <2 x i8>* %cast
+ %vec = load <2 x i8>, <2 x i8>* %cast
; CHECK-NOT: load
ret <2 x i8> %vec
@@ -459,7 +459,7 @@ entry:
store <2 x i8> %x, <2 x i8>* %cast
; CHECK-NOT: store
- %int = load i32* %a
+ %int = load i32, i32* %a
; CHECK-NOT: load
ret i32 %int
@@ -477,18 +477,18 @@ entry:
%a.cast = bitcast [2 x i64]* %a to [2 x <2 x i32>]*
; CHECK-NOT: alloca
- %a.x = getelementptr inbounds [2 x <2 x i32>]* %a.cast, i64 0, i64 0
+ %a.x = getelementptr inbounds [2 x <2 x i32>], [2 x <2 x i32>]* %a.cast, i64 0, i64 0
store <2 x i32> %x, <2 x i32>* %a.x
- %a.y = getelementptr inbounds [2 x <2 x i32>]* %a.cast, i64 0, i64 1
+ %a.y = getelementptr inbounds [2 x <2 x i32>], [2 x <2 x i32>]* %a.cast, i64 0, i64 1
store <2 x i32> %y, <2 x i32>* %a.y
; CHECK-NOT: store
- %a.tmp1 = getelementptr inbounds [2 x <2 x i32>]* %a.cast, i64 0, i64 0, i64 1
- %tmp1 = load i32* %a.tmp1
- %a.tmp2 = getelementptr inbounds [2 x <2 x i32>]* %a.cast, i64 0, i64 1, i64 1
- %tmp2 = load i32* %a.tmp2
- %a.tmp3 = getelementptr inbounds [2 x <2 x i32>]* %a.cast, i64 0, i64 1, i64 0
- %tmp3 = load i32* %a.tmp3
+ %a.tmp1 = getelementptr inbounds [2 x <2 x i32>], [2 x <2 x i32>]* %a.cast, i64 0, i64 0, i64 1
+ %tmp1 = load i32, i32* %a.tmp1
+ %a.tmp2 = getelementptr inbounds [2 x <2 x i32>], [2 x <2 x i32>]* %a.cast, i64 0, i64 1, i64 1
+ %tmp2 = load i32, i32* %a.tmp2
+ %a.tmp3 = getelementptr inbounds [2 x <2 x i32>], [2 x <2 x i32>]* %a.cast, i64 0, i64 1, i64 0
+ %tmp3 = load i32, i32* %a.tmp3
; CHECK-NOT: load
; CHECK: extractelement <2 x i32> %x, i32 1
; CHECK-NEXT: extractelement <2 x i32> %y, i32 1
@@ -515,9 +515,9 @@ entry:
store <2 x i32> %x, <2 x i32>* %a.vec
; CHECK-NOT: store
- %tmp1 = load i32* %a.i32
- %a.tmp2 = getelementptr inbounds i32* %a.i32, i64 1
- %tmp2 = load i32* %a.tmp2
+ %tmp1 = load i32, i32* %a.i32
+ %a.tmp2 = getelementptr inbounds i32, i32* %a.i32, i64 1
+ %tmp2 = load i32, i32* %a.tmp2
; CHECK-NOT: load
; CHECK: extractelement <2 x i32> %x, i32 0
; CHECK-NEXT: extractelement <2 x i32> %x, i32 1
@@ -539,13 +539,13 @@ entry:
; CHECK-NOT: alloca
store i32 %x, i32* %a.i32
- %a.tmp2 = getelementptr inbounds i32* %a.i32, i64 1
+ %a.tmp2 = getelementptr inbounds i32, i32* %a.i32, i64 1
store i32 %y, i32* %a.tmp2
; CHECK-NOT: store
; CHECK: %[[V1:.*]] = insertelement <2 x i32> undef, i32 %x, i32 0
; CHECK-NEXT: %[[V2:.*]] = insertelement <2 x i32> %[[V1]], i32 %y, i32 1
- %result = load <2 x i32>* %a.vec
+ %result = load <2 x i32>, <2 x i32>* %a.vec
; CHECK-NOT: load
ret <2 x i32> %result
@@ -564,13 +564,13 @@ entry:
; CHECK-NOT: alloca
store <4 x i16> %x, <4 x i16>* %a.vec2
- %a.tmp2 = getelementptr inbounds i32* %a.i32, i64 1
+ %a.tmp2 = getelementptr inbounds i32, i32* %a.i32, i64 1
store i32 %y, i32* %a.tmp2
; CHECK-NOT: store
; CHECK: %[[V1:.*]] = bitcast <4 x i16> %x to <2 x i32>
; CHECK-NEXT: %[[V2:.*]] = insertelement <2 x i32> %[[V1]], i32 %y, i32 1
- %result = load <2 x i32>* %a.vec1
+ %result = load <2 x i32>, <2 x i32>* %a.vec1
; CHECK-NOT: load
ret <2 x i32> %result
@@ -590,7 +590,7 @@ entry:
; CHECK-NOT: alloca
store <4 x i16> %x, <4 x i16>* %a.vec2
- %a.tmp2 = getelementptr inbounds i32* %a.i32, i64 1
+ %a.tmp2 = getelementptr inbounds i32, i32* %a.i32, i64 1
store i32 %y, i32* %a.tmp2
; CHECK-NOT: store
; CHECK: %[[V1:.*]] = bitcast i32 %y to <2 x i16>
@@ -598,7 +598,7 @@ entry:
; CHECK-NEXT: %[[V3:.*]] = select <4 x i1> <i1 false, i1 false, i1 true, i1 true>, <4 x i16> %[[V2]], <4 x i16> %x
; CHECK-NEXT: %[[V4:.*]] = bitcast <4 x i16> %[[V3]] to <2 x float>
- %result = load <2 x float>* %a.vec1
+ %result = load <2 x float>, <2 x float>* %a.vec1
; CHECK-NOT: load
ret <2 x float> %result
@@ -616,7 +616,7 @@ define <4 x float> @test12() {
%cast2 = bitcast <3 x i32>* %a to <3 x float>*
%cast3 = bitcast <3 x float>* %cast2 to <4 x float>*
- %vec = load <4 x float>* %cast3
+ %vec = load <4 x float>, <4 x float>* %cast3
; CHECK-NOT: load
; CHECK: %[[ret:.*]] = bitcast <4 x i32> undef to <4 x float>
diff --git a/test/Transforms/SROA/vectors-of-pointers.ll b/test/Transforms/SROA/vectors-of-pointers.ll
index 7e995b9..ff09e95 100644
--- a/test/Transforms/SROA/vectors-of-pointers.ll
+++ b/test/Transforms/SROA/vectors-of-pointers.ll
@@ -20,6 +20,6 @@ if.then.i.i.i.i.i237:
unreachable
bb0.exit257:
- %0 = load <2 x i32*>* %Args.i, align 16
+ %0 = load <2 x i32*>, <2 x i32*>* %Args.i, align 16
unreachable
}