Commit 0a903bf
[RISCV] Canonicalize beq/bne with x0 as first arg to beqz/bnez (#141781)
This covers similar ground as #139086. Although I think it makes sense
to land both, the practical motivation for #139086 is significantly
reduced here.
This canonicalisation makes no difference to compressibility (we have
compress patterns for the operands in either order), but it does mean
that easier to read assembly is printed, as we don't have aliases
defined for beq/bne with x0 in either position.1 parent 56745e0 commit 0a903bf
File tree
2 files changed
+45
-0
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV
2 files changed
+45
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4189 | 4189 | | |
4190 | 4190 | | |
4191 | 4191 | | |
| 4192 | + | |
| 4193 | + | |
| 4194 | + | |
| 4195 | + | |
| 4196 | + | |
| 4197 | + | |
| 4198 | + | |
| 4199 | + | |
| 4200 | + | |
4192 | 4201 | | |
4193 | 4202 | | |
4194 | 4203 | | |
| |||
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
746 | 782 | | |
747 | 783 | | |
748 | 784 | | |
| |||
0 commit comments