Commit 5b91756
[RISCV][Peephole] Checking regclass compatibility in VMV (#138844)
Without checking the regclass compatibility, this pass may generate bad
machine code.
```
*** Bad machine code: Illegal virtual register for instruction ***
- function: main
- basic block: %bb.0 entry (0x9209848)
- instruction: %3:vrnov0 = PseudoVXOR_VV_MF2_MASK %0:vr(tied-def 0), %0:vr, %0:vr, %4:vmv0, 0, 5, 0
- operand 1: %0:vr(tied-def 0)
Expected a VRNoV0 register, but got a VR register
```
---------
Co-authored-by: Luke Lau <[email protected]>1 parent 4c9ffb7 commit 5b91756
File tree
2 files changed
+34
-0
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
2 files changed
+34
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| 586 | + | |
| 587 | + | |
586 | 588 | | |
587 | 589 | | |
588 | 590 | | |
| |||
653 | 655 | | |
654 | 656 | | |
655 | 657 | | |
| 658 | + | |
| 659 | + | |
656 | 660 | | |
657 | 661 | | |
658 | 662 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
0 commit comments