Commit 8b9c94e
Automerge: [VPlan] Add ExtractLastLanePerPart, use in narrowToSingleScalar. (#163056)
When narrowing stores of a single-scalar, we currently use
ExtractLastElement, which extracts the last element across all parts.
This is not correct if the store's address is not uniform across all
parts. If it is only uniform-per-part, the last lane per part must be
extracted. Add a new ExtractLastLanePerPart opcode to handle this
correctly. Most transforms apply to both ExtractLastElement and
ExtractLastLanePerPart, with the only difference being their treatment
during unrolling.
Fixes llvm/llvm-project#162498.
PR: llvm/llvm-project#163056File tree
7 files changed
+48
-14
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms/LoopVectorize
- AArch64
7 files changed
+48
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
| 1015 | + | |
| 1016 | + | |
1015 | 1017 | | |
1016 | 1018 | | |
1017 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
375 | 381 | | |
376 | 382 | | |
377 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
| 514 | + | |
514 | 515 | | |
515 | 516 | | |
516 | 517 | | |
| |||
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
| 882 | + | |
881 | 883 | | |
882 | 884 | | |
883 | | - | |
| 885 | + | |
| 886 | + | |
884 | 887 | | |
885 | 888 | | |
886 | 889 | | |
| |||
1166 | 1169 | | |
1167 | 1170 | | |
1168 | 1171 | | |
| 1172 | + | |
1169 | 1173 | | |
1170 | 1174 | | |
1171 | 1175 | | |
| |||
1229 | 1233 | | |
1230 | 1234 | | |
1231 | 1235 | | |
| 1236 | + | |
1232 | 1237 | | |
1233 | 1238 | | |
1234 | 1239 | | |
| |||
1376 | 1381 | | |
1377 | 1382 | | |
1378 | 1383 | | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
1379 | 1387 | | |
1380 | 1388 | | |
1381 | 1389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1209 | 1209 | | |
1210 | 1210 | | |
1211 | 1211 | | |
1212 | | - | |
| 1212 | + | |
| 1213 | + | |
1213 | 1214 | | |
1214 | 1215 | | |
1215 | 1216 | | |
| |||
1275 | 1276 | | |
1276 | 1277 | | |
1277 | 1278 | | |
1278 | | - | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1279 | 1282 | | |
1280 | 1283 | | |
1281 | 1284 | | |
1282 | 1285 | | |
1283 | | - | |
1284 | | - | |
| 1286 | + | |
| 1287 | + | |
1285 | 1288 | | |
1286 | 1289 | | |
1287 | 1290 | | |
1288 | 1291 | | |
1289 | 1292 | | |
1290 | 1293 | | |
1291 | 1294 | | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
1292 | 1301 | | |
1293 | 1302 | | |
1294 | 1303 | | |
| |||
1326 | 1335 | | |
1327 | 1336 | | |
1328 | 1337 | | |
1329 | | - | |
1330 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
1331 | 1343 | | |
1332 | 1344 | | |
1333 | 1345 | | |
| |||
1341 | 1353 | | |
1342 | 1354 | | |
1343 | 1355 | | |
1344 | | - | |
| 1356 | + | |
| 1357 | + | |
1345 | 1358 | | |
1346 | 1359 | | |
1347 | 1360 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| 161 | + | |
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| 167 | + | |
165 | 168 | | |
166 | | - | |
| 169 | + | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
| 77 | + | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| 123 | + | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
0 commit comments