aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/gep-sext.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/gep-sext.ll')
-rw-r--r--test/Transforms/InstCombine/gep-sext.ll32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/Transforms/InstCombine/gep-sext.ll b/test/Transforms/InstCombine/gep-sext.ll
index 3d23dab..36e2aef 100644
--- a/test/Transforms/InstCombine/gep-sext.ll
+++ b/test/Transforms/InstCombine/gep-sext.ll
@@ -8,9 +8,9 @@ declare void @use(i32) readonly
define void @test(i32* %p, i32 %index) {
; CHECK-LABEL: @test
; CHECK-NEXT: %1 = sext i32 %index to i64
-; CHECK-NEXT: %addr = getelementptr i32* %p, i64 %1
- %addr = getelementptr i32* %p, i32 %index
- %val = load i32* %addr
+; CHECK-NEXT: %addr = getelementptr i32, i32* %p, i64 %1
+ %addr = getelementptr i32, i32* %p, i32 %index
+ %val = load i32, i32* %addr
call void @use(i32 %val)
ret void
}
@@ -18,10 +18,10 @@ define void @test(i32* %p, i32 %index) {
define void @test2(i32* %p, i32 %index) {
; CHECK-LABEL: @test2
; CHECK-NEXT: %i = zext i32 %index to i64
-; CHECK-NEXT: %addr = getelementptr i32* %p, i64 %i
+; CHECK-NEXT: %addr = getelementptr i32, i32* %p, i64 %i
%i = zext i32 %index to i64
- %addr = getelementptr i32* %p, i64 %i
- %val = load i32* %addr
+ %addr = getelementptr i32, i32* %p, i64 %i
+ %val = load i32, i32* %addr
call void @use(i32 %val)
ret void
}
@@ -31,11 +31,11 @@ define void @test3(i32* %p, i32 %index) {
; CHECK-LABEL: @test3
; CHECK: zext
; CHECK-NOT: sext
- %addr_begin = getelementptr i32* %p, i64 40
- %addr_fixed = getelementptr i32* %addr_begin, i64 48
- %val_fixed = load i32* %addr_fixed, !range !0
- %addr = getelementptr i32* %addr_begin, i32 %val_fixed
- %val = load i32* %addr
+ %addr_begin = getelementptr i32, i32* %p, i64 40
+ %addr_fixed = getelementptr i32, i32* %addr_begin, i64 48
+ %val_fixed = load i32, i32* %addr_fixed, !range !0
+ %addr = getelementptr i32, i32* %addr_begin, i32 %val_fixed
+ %val = load i32, i32* %addr
call void @use(i32 %val)
ret void
}
@@ -44,12 +44,12 @@ define void @test4(i32* %p, i32 %index) {
; CHECK-LABEL: @test4
; CHECK: zext
; CHECK-NOT: sext
- %addr_begin = getelementptr i32* %p, i64 40
- %addr_fixed = getelementptr i32* %addr_begin, i64 48
- %val_fixed = load i32* %addr_fixed, !range !0
+ %addr_begin = getelementptr i32, i32* %p, i64 40
+ %addr_fixed = getelementptr i32, i32* %addr_begin, i64 48
+ %val_fixed = load i32, i32* %addr_fixed, !range !0
%i = sext i32 %val_fixed to i64
- %addr = getelementptr i32* %addr_begin, i64 %i
- %val = load i32* %addr
+ %addr = getelementptr i32, i32* %addr_begin, i64 %i
+ %val = load i32, i32* %addr
call void @use(i32 %val)
ret void
}