Skip to content

Commit 245cd46

Browse files
committed
Address review comments
1 parent 3cef654 commit 245cd46

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

llvm/test/Transforms/LoopVectorize/last-min-index.ll

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
; The function minlst primarily takes two indices (i.e. range), scans backwards in the range
88
; and returns the firstIV of the minimum value.
99

10-
define fastcc i32 @minlst(i32 %first_index, i32 %last_index, ptr %array) {
10+
define i32 @minlst(i32 %first_index, i32 %last_index, ptr %array) {
1111
; CHECK-REV-MIN-LABEL: define fastcc i32 @minlst(
1212
; CHECK-REV-MIN-SAME: i32 [[FIRST_INDEX:%.*]], i32 [[LAST_INDEX:%.*]], ptr [[ARRAY:%.*]]) {
1313
; CHECK-REV-MIN-NEXT: [[ENTRY:.*]]:
@@ -46,7 +46,7 @@ define fastcc i32 @minlst(i32 %first_index, i32 %last_index, ptr %array) {
4646
; CHECK-REV-MIN-NEXT: [[LAST_INDEX_RET:%.*]] = phi i32 [ [[LAST_INDEX]], %[[ENTRY]] ], [ [[SELECT_LCSSA]], %[[DOT_CRIT_EDGE_LOOPEXIT]] ]
4747
; CHECK-REV-MIN-NEXT: ret i32 [[LAST_INDEX_RET]]
4848
;
49-
; CHECK-REV-MIN-VW1-IL4-LABEL: define fastcc i32 @minlst(
49+
; CHECK-REV-MIN-VW1-IL4-LABEL: define i32 @minlst(
5050
; CHECK-REV-MIN-VW1-IL4-SAME: i32 [[FIRST_INDEX:%.*]], i32 [[LAST_INDEX:%.*]], ptr [[ARRAY:%.*]]) {
5151
; CHECK-REV-MIN-VW1-IL4-NEXT: [[ENTRY:.*]]:
5252
; CHECK-REV-MIN-VW1-IL4-NEXT: [[FIRST_INDEX_SEXT:%.*]] = sext i32 [[FIRST_INDEX]] to i64
@@ -84,7 +84,7 @@ define fastcc i32 @minlst(i32 %first_index, i32 %last_index, ptr %array) {
8484
; CHECK-REV-MIN-VW1-IL4-NEXT: [[LAST_INDEX_RET:%.*]] = phi i32 [ [[LAST_INDEX]], %[[ENTRY]] ], [ [[SELECT_LCSSA]], %[[DOT_CRIT_EDGE_LOOPEXIT]] ]
8585
; CHECK-REV-MIN-VW1-IL4-NEXT: ret i32 [[LAST_INDEX_RET]]
8686
;
87-
; CHECK-REV-MIN-VW4-IL1-LABEL: define fastcc i32 @minlst(
87+
; CHECK-REV-MIN-VW4-IL1-LABEL: define i32 @minlst(
8888
; CHECK-REV-MIN-VW4-IL1-SAME: i32 [[FIRST_INDEX:%.*]], i32 [[LAST_INDEX:%.*]], ptr [[ARRAY:%.*]]) {
8989
; CHECK-REV-MIN-VW4-IL1-NEXT: [[ENTRY:.*]]:
9090
; CHECK-REV-MIN-VW4-IL1-NEXT: [[FIRST_INDEX_SEXT:%.*]] = sext i32 [[FIRST_INDEX]] to i64
@@ -122,7 +122,7 @@ define fastcc i32 @minlst(i32 %first_index, i32 %last_index, ptr %array) {
122122
; CHECK-REV-MIN-VW4-IL1-NEXT: [[LAST_INDEX_RET:%.*]] = phi i32 [ [[LAST_INDEX]], %[[ENTRY]] ], [ [[SELECT_LCSSA]], %[[DOT_CRIT_EDGE_LOOPEXIT]] ]
123123
; CHECK-REV-MIN-VW4-IL1-NEXT: ret i32 [[LAST_INDEX_RET]]
124124
;
125-
; CHECK-REV-MIN-VW4-IL2-LABEL: define fastcc i32 @minlst(
125+
; CHECK-REV-MIN-VW4-IL2-LABEL: define i32 @minlst(
126126
; CHECK-REV-MIN-VW4-IL2-SAME: i32 [[FIRST_INDEX:%.*]], i32 [[LAST_INDEX:%.*]], ptr [[ARRAY:%.*]]) {
127127
; CHECK-REV-MIN-VW4-IL2-NEXT: [[ENTRY:.*]]:
128128
; CHECK-REV-MIN-VW4-IL2-NEXT: [[FIRST_INDEX_SEXT:%.*]] = sext i32 [[FIRST_INDEX]] to i64
@@ -190,13 +190,13 @@ loop: ; preds = %loop.preheader, %loop
190190
%select = select i1 %cmp, i32 %iv.next.trunc, i32 %index
191191
%dec = add nsw i64 %dec_iv, -1
192192
%loop_cond = icmp sgt i64 %dec_iv, 1
193-
br i1 %loop_cond, label %loop, label %._crit_edge.loopexit
193+
br i1 %loop_cond, label %loop, label %._crit_edge
194194

195-
._crit_edge.loopexit: ; preds = %loop
196-
%select.lcssa = phi i32 [ %select, %loop ]
197-
br label %._crit_edge
195+
;._crit_edge.loopexit: ; preds = %loop
196+
; %select.lcssa = phi i32 [ %select, %loop ]
197+
; br label %._crit_edge
198198

199-
._crit_edge: ; preds = %._crit_edge.loopexit, %0
200-
%last_index_ret = phi i32 [ %last_index, %entry ], [ %select.lcssa, %._crit_edge.loopexit ]
199+
._crit_edge: ; preds = %loop, %entry
200+
%last_index_ret = phi i32 [ %select, %loop ], [ %last_index, %entry ]
201201
ret i32 %last_index_ret
202202
}

0 commit comments

Comments
 (0)