aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/LICM/scalar_promote.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/LICM/scalar_promote.ll')
-rw-r--r--test/Transforms/LICM/scalar_promote.ll38
1 files changed, 19 insertions, 19 deletions
diff --git a/test/Transforms/LICM/scalar_promote.ll b/test/Transforms/LICM/scalar_promote.ll
index 80afb3c..6ef4bac 100644
--- a/test/Transforms/LICM/scalar_promote.ll
+++ b/test/Transforms/LICM/scalar_promote.ll
@@ -8,13 +8,13 @@ Entry:
br label %Loop
; CHECK-LABEL: @test1(
; CHECK: Entry:
-; CHECK-NEXT: load i32* @X
+; CHECK-NEXT: load i32, i32* @X
; CHECK-NEXT: br label %Loop
Loop: ; preds = %Loop, %0
%j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] ; <i32> [#uses=1]
- %x = load i32* @X ; <i32> [#uses=1]
+ %x = load i32, i32* @X ; <i32> [#uses=1]
%x2 = add i32 %x, 1 ; <i32> [#uses=1]
store i32 %x2, i32* @X
%Next = add i32 %j, 1 ; <i32> [#uses=2]
@@ -35,14 +35,14 @@ Entry:
br label %Loop
; CHECK-LABEL: @test2(
; CHECK: Entry:
-; CHECK-NEXT: %.promoted = load i32* getelementptr inbounds (i32* @X, i64 1)
+; CHECK-NEXT: %.promoted = load i32, i32* getelementptr inbounds (i32, i32* @X, i64 1)
; CHECK-NEXT: br label %Loop
Loop: ; preds = %Loop, %0
- %X1 = getelementptr i32* @X, i64 1 ; <i32*> [#uses=1]
- %A = load i32* %X1 ; <i32> [#uses=1]
+ %X1 = getelementptr i32, i32* @X, i64 1 ; <i32*> [#uses=1]
+ %A = load i32, i32* %X1 ; <i32> [#uses=1]
%V = add i32 %A, 1 ; <i32> [#uses=1]
- %X2 = getelementptr i32* @X, i64 1 ; <i32*> [#uses=1]
+ %X2 = getelementptr i32, i32* @X, i64 1 ; <i32*> [#uses=1]
store i32 %V, i32* %X2
br i1 false, label %Loop, label %Exit
@@ -50,7 +50,7 @@ Exit: ; preds = %Loop
ret void
; CHECK: Exit:
; CHECK-NEXT: %[[LCSSAPHI:.*]] = phi i32 [ %V
-; CHECK-NEXT: store i32 %[[LCSSAPHI]], i32* getelementptr inbounds (i32* @X, i64 1)
+; CHECK-NEXT: store i32 %[[LCSSAPHI]], i32* getelementptr inbounds (i32, i32* @X, i64 1)
; CHECK-NEXT: ret void
}
@@ -61,7 +61,7 @@ define void @test3(i32 %i) {
br label %Loop
Loop:
; Should not promote this to a register
- %x = load volatile i32* @X
+ %x = load volatile i32, i32* @X
%x2 = add i32 %x, 1
store i32 %x2, i32* @X
br i1 true, label %Out, label %Loop
@@ -82,15 +82,15 @@ define void @test4(i8* %x, i8 %n) {
br label %loop
loop:
- %tmp = getelementptr i8* %x, i64 8
+ %tmp = getelementptr i8, i8* %x, i64 8
store i8* %tmp, i8** %handle2
br label %subloop
subloop:
%count = phi i8 [ 0, %loop ], [ %nextcount, %subloop ]
- %offsetx2 = load i8** %handle2
+ %offsetx2 = load i8*, i8** %handle2
store i8 %n, i8* %offsetx2
- %newoffsetx2 = getelementptr i8* %offsetx2, i64 -1
+ %newoffsetx2 = getelementptr i8, i8* %offsetx2, i64 -1
store i8* %newoffsetx2, i8** %handle2
%nextcount = add i8 %count, 1
%innerexitcond = icmp sge i8 %nextcount, 8
@@ -105,14 +105,14 @@ subloop:
; CHECK: br i1
innerexit:
- %offsetx1 = load i8** %handle1
- %val = load i8* %offsetx1
+ %offsetx1 = load i8*, i8** %handle1
+ %val = load i8, i8* %offsetx1
%cond = icmp eq i8 %val, %n
br i1 %cond, label %exit, label %loop
; Should not have promoted offsetx1 loads.
; CHECK: innerexit:
-; CHECK: %val = load i8* %offsetx1
+; CHECK: %val = load i8, i8* %offsetx1
; CHECK: %cond = icmp eq i8 %val, %n
; CHECK: br i1 %cond, label %exit, label %loop
@@ -125,13 +125,13 @@ Entry:
br label %Loop
; CHECK-LABEL: @test5(
; CHECK: Entry:
-; CHECK-NEXT: load i32* @X
+; CHECK-NEXT: load i32, i32* @X
; CHECK-NEXT: br label %Loop
Loop: ; preds = %Loop, %0
%j = phi i32 [ 0, %Entry ], [ %Next, %Loop ] ; <i32> [#uses=1]
- %x = load i32* @X ; <i32> [#uses=1]
+ %x = load i32, i32* @X ; <i32> [#uses=1]
%x2 = add i32 %x, 1 ; <i32> [#uses=1]
store i32 %x2, i32* @X
@@ -164,9 +164,9 @@ for.body.lr.ph: ; preds = %entry
for.body: ; preds = %for.body.lr.ph, %for.body
%storemerge2 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
%idxprom = sext i32 %storemerge2 to i64
- %arrayidx = getelementptr inbounds float* %a, i64 %idxprom
+ %arrayidx = getelementptr inbounds float, float* %a, i64 %idxprom
store float 0.000000e+00, float* %arrayidx, align 4, !tbaa !3
- %0 = load i32* %gi, align 4, !tbaa !0
+ %0 = load i32, i32* %gi, align 4, !tbaa !0
%inc = add nsw i32 %0, 1
store i32 %inc, i32* %gi, align 4, !tbaa !0
%cmp = icmp slt i32 %inc, %n
@@ -179,7 +179,7 @@ for.end: ; preds = %for.cond.for.end_cr
ret void
; CHECK: for.body.lr.ph:
-; CHECK-NEXT: %gi.promoted = load i32* %gi, align 4, !tbaa !0
+; CHECK-NEXT: %gi.promoted = load i32, i32* %gi, align 4, !tbaa !0
; CHECK: for.cond.for.end_crit_edge:
; CHECK-NEXT: %[[LCSSAPHI:.*]] = phi i32 [ %inc
; CHECK-NEXT: store i32 %[[LCSSAPHI]], i32* %gi, align 4, !tbaa !0