Commit e6e3f77
committed
[RISCV] Fold vmv.v.v into vmerge
We support folding vmv.v.v into its source via the foldVMV_V_V peephole, but currently it requires that the source has a policy operand.
PseudoVMERGEs (as well as add-with-carry/subtract-with-borrow pseudos) don't have a policy operand, and instead just seem to derive TA/TU from whether or not the passthru is undef, since the mask policy doesn't affect them.
This patch allows pseudos without policy operands, given that if there's no policy operand then it will default to TU when the passthru is undefined which should be conservatively correct.
I previously tried adding a policy operand to vmerge/vadc etc., but this ended up being a lot of churn.
This removes a bunch of redundant vmv.v.vs that I noticed with EVL tail folding on llvm-test-suite.1 parent cc22263 commit e6e3f77
File tree
4 files changed
+14
-18
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
4 files changed
+14
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
650 | | - | |
| 649 | + | |
651 | 650 | | |
652 | 651 | | |
653 | 652 | | |
| |||
681 | 680 | | |
682 | 681 | | |
683 | 682 | | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
690 | 691 | | |
691 | 692 | | |
692 | 693 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
558 | 557 | | |
559 | | - | |
| 558 | + | |
560 | 559 | | |
561 | 560 | | |
562 | 561 | | |
| |||
568 | 567 | | |
569 | 568 | | |
570 | 569 | | |
571 | | - | |
572 | 570 | | |
573 | | - | |
| 571 | + | |
574 | 572 | | |
575 | 573 | | |
576 | 574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | | - | |
232 | | - | |
| 230 | + | |
233 | 231 | | |
234 | 232 | | |
235 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | | - | |
166 | | - | |
| 165 | + | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
0 commit comments