Commit 336b290
authored
[RISCV] Use a DAG combine to prune pointless vrgather.vi (llvm#135392)
If the vrgather.vi is preceeded by a vmv.v.x which writes a superset of
the lanes writen by the vrgather, and the vrgather has no passthru, then
the vrgather has no semantic effect.
This is the start of a mini-series of patches around rewriting
vrgather.vi/vx preceeded by vmv.v.x, vfmf.v.f, vmv.s.x, etc... Starting
with the simplest, but also lowest impact.
One point I'd like a second oppinion on is the out of bounds semenatic
change. As far as I can tell, all the indices are in bounds by
construction. The doc change is as much as I couldn't figure out how to
test the alternative as anything else.1 parent 357e380 commit 336b290
File tree
3 files changed
+17
-4
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
3 files changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19709 | 19709 | | |
19710 | 19710 | | |
19711 | 19711 | | |
| 19712 | + | |
| 19713 | + | |
| 19714 | + | |
| 19715 | + | |
| 19716 | + | |
| 19717 | + | |
| 19718 | + | |
| 19719 | + | |
| 19720 | + | |
| 19721 | + | |
| 19722 | + | |
| 19723 | + | |
| 19724 | + | |
19712 | 19725 | | |
19713 | 19726 | | |
19714 | 19727 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1346 | 1346 | | |
1347 | 1347 | | |
1348 | 1348 | | |
1349 | | - | |
| 1349 | + | |
1350 | 1350 | | |
1351 | | - | |
1352 | | - | |
| 1351 | + | |
1353 | 1352 | | |
1354 | 1353 | | |
1355 | 1354 | | |
| |||
0 commit comments