Commit 6238b8e
committed
[LegalizeTypes] Factor in vscale_range when widening insert_subvector
Currently when widening operands for insert_subvector nodes, we check
first that the indices are valid by seeing if the subvector is
statically known to be smaller than or equal to the in-place vector.
However if we're inserting a fixed subvector into a scalable vector we rely on
the minimum vector length of the latter. This patch extends the widening logic
to also take into account the minimum vscale from the vscale_range attribute,
so we can handle more scenarios where we know the scalable vector is large
enough to contain the subvector.
Fixes llvm#63437
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D1535191 parent 28f1312 commit 6238b8e
File tree
2 files changed
+38
-2
lines changed- llvm
- lib/CodeGen/SelectionDAG
- test/CodeGen/RISCV/rvv
2 files changed
+38
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6317 | 6317 | | |
6318 | 6318 | | |
6319 | 6319 | | |
6320 | | - | |
6321 | | - | |
| 6320 | + | |
| 6321 | + | |
| 6322 | + | |
| 6323 | + | |
| 6324 | + | |
| 6325 | + | |
| 6326 | + | |
| 6327 | + | |
| 6328 | + | |
| 6329 | + | |
| 6330 | + | |
| 6331 | + | |
| 6332 | + | |
| 6333 | + | |
| 6334 | + | |
| 6335 | + | |
| 6336 | + | |
| 6337 | + | |
| 6338 | + | |
| 6339 | + | |
| 6340 | + | |
| 6341 | + | |
| 6342 | + | |
| 6343 | + | |
6322 | 6344 | | |
6323 | 6345 | | |
6324 | 6346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
498 | 510 | | |
499 | 511 | | |
500 | 512 | | |
| |||
512 | 524 | | |
513 | 525 | | |
514 | 526 | | |
| 527 | + | |
| 528 | + | |
0 commit comments