Commit ed3f488
committed
[RISCV] Allow non-loop invariant steps in RISCVGatherScatterLowering
The motivation for this is to allow us to match strided accesses that are emitted from the loop vectorizer with EVL tail folding (see #122232)
In these loops the step isn't loop invariant and is based off of @llvm.experimental.get.vector.length.
We can relax this as long as we make sure to construct the updates after the definition inside the loop, instead of the preheader.
I presume the restriction was previously added so that the step would dominate the insertion point in the preheader. I can't think of why it wouldn't be safe to calculate it in the loop otherwise.1 parent 25c0978 commit ed3f488
File tree
3 files changed
+24
-16
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
3 files changed
+24
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 215 | | |
220 | 216 | | |
221 | 217 | | |
| |||
311 | 307 | | |
312 | 308 | | |
313 | 309 | | |
314 | | - | |
315 | 310 | | |
316 | 311 | | |
317 | 312 | | |
318 | 313 | | |
319 | 314 | | |
320 | | - | |
321 | 315 | | |
322 | 316 | | |
323 | 317 | | |
324 | 318 | | |
325 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
326 | 335 | | |
327 | 336 | | |
328 | 337 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
| 323 | + | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
407 | 406 | | |
408 | 407 | | |
409 | 408 | | |
410 | | - | |
| 409 | + | |
411 | 410 | | |
412 | 411 | | |
413 | 412 | | |
414 | 413 | | |
415 | | - | |
416 | | - | |
417 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | | - | |
421 | | - | |
422 | | - | |
| 421 | + | |
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
| |||
0 commit comments