Commit 596640a
authored
[RISCV] Fold vmv.v.v into vmerge (#151341)
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 19f3aca commit 596640a
File tree
4 files changed
+38
-12
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
4 files changed
+38
-12
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 | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
0 commit comments