|
7 | 7 | ; The function minlst primarily takes two indices (i.e. range), scans backwards in the range
|
8 | 8 | ; and returns the firstIV of the minimum value.
|
9 | 9 |
|
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) { |
11 | 11 | ; CHECK-REV-MIN-LABEL: define fastcc i32 @minlst(
|
12 | 12 | ; CHECK-REV-MIN-SAME: i32 [[FIRST_INDEX:%.*]], i32 [[LAST_INDEX:%.*]], ptr [[ARRAY:%.*]]) {
|
13 | 13 | ; CHECK-REV-MIN-NEXT: [[ENTRY:.*]]:
|
@@ -46,7 +46,7 @@ define fastcc i32 @minlst(i32 %first_index, i32 %last_index, ptr %array) {
|
46 | 46 | ; CHECK-REV-MIN-NEXT: [[LAST_INDEX_RET:%.*]] = phi i32 [ [[LAST_INDEX]], %[[ENTRY]] ], [ [[SELECT_LCSSA]], %[[DOT_CRIT_EDGE_LOOPEXIT]] ]
|
47 | 47 | ; CHECK-REV-MIN-NEXT: ret i32 [[LAST_INDEX_RET]]
|
48 | 48 | ;
|
49 |
| -; CHECK-REV-MIN-VW1-IL4-LABEL: define fastcc i32 @minlst( |
| 49 | +; CHECK-REV-MIN-VW1-IL4-LABEL: define i32 @minlst( |
50 | 50 | ; CHECK-REV-MIN-VW1-IL4-SAME: i32 [[FIRST_INDEX:%.*]], i32 [[LAST_INDEX:%.*]], ptr [[ARRAY:%.*]]) {
|
51 | 51 | ; CHECK-REV-MIN-VW1-IL4-NEXT: [[ENTRY:.*]]:
|
52 | 52 | ; 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) {
|
84 | 84 | ; CHECK-REV-MIN-VW1-IL4-NEXT: [[LAST_INDEX_RET:%.*]] = phi i32 [ [[LAST_INDEX]], %[[ENTRY]] ], [ [[SELECT_LCSSA]], %[[DOT_CRIT_EDGE_LOOPEXIT]] ]
|
85 | 85 | ; CHECK-REV-MIN-VW1-IL4-NEXT: ret i32 [[LAST_INDEX_RET]]
|
86 | 86 | ;
|
87 |
| -; CHECK-REV-MIN-VW4-IL1-LABEL: define fastcc i32 @minlst( |
| 87 | +; CHECK-REV-MIN-VW4-IL1-LABEL: define i32 @minlst( |
88 | 88 | ; CHECK-REV-MIN-VW4-IL1-SAME: i32 [[FIRST_INDEX:%.*]], i32 [[LAST_INDEX:%.*]], ptr [[ARRAY:%.*]]) {
|
89 | 89 | ; CHECK-REV-MIN-VW4-IL1-NEXT: [[ENTRY:.*]]:
|
90 | 90 | ; 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) {
|
122 | 122 | ; CHECK-REV-MIN-VW4-IL1-NEXT: [[LAST_INDEX_RET:%.*]] = phi i32 [ [[LAST_INDEX]], %[[ENTRY]] ], [ [[SELECT_LCSSA]], %[[DOT_CRIT_EDGE_LOOPEXIT]] ]
|
123 | 123 | ; CHECK-REV-MIN-VW4-IL1-NEXT: ret i32 [[LAST_INDEX_RET]]
|
124 | 124 | ;
|
125 |
| -; CHECK-REV-MIN-VW4-IL2-LABEL: define fastcc i32 @minlst( |
| 125 | +; CHECK-REV-MIN-VW4-IL2-LABEL: define i32 @minlst( |
126 | 126 | ; CHECK-REV-MIN-VW4-IL2-SAME: i32 [[FIRST_INDEX:%.*]], i32 [[LAST_INDEX:%.*]], ptr [[ARRAY:%.*]]) {
|
127 | 127 | ; CHECK-REV-MIN-VW4-IL2-NEXT: [[ENTRY:.*]]:
|
128 | 128 | ; CHECK-REV-MIN-VW4-IL2-NEXT: [[FIRST_INDEX_SEXT:%.*]] = sext i32 [[FIRST_INDEX]] to i64
|
@@ -190,13 +190,13 @@ loop: ; preds = %loop.preheader, %loop
|
190 | 190 | %select = select i1 %cmp, i32 %iv.next.trunc, i32 %index
|
191 | 191 | %dec = add nsw i64 %dec_iv, -1
|
192 | 192 | %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 |
194 | 194 |
|
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 |
198 | 198 |
|
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 ] |
201 | 201 | ret i32 %last_index_ret
|
202 | 202 | }
|
0 commit comments