Commit fc10ad1
authored
[RISCV] Make single source reverse legal in isShuffleMaskLegal (llvm#125949)
This enables DAG combines to form this mask. Reverse is generally linear
in LMUL so this is reasonable, and results in better codegen for the 2
source variants.
For <= m1, the change is only slightly profitable if at all. We trade
some mask creation and an extract vrsub for a vslideup.vi. This is
likely roughly neutral. At >= m2, this is distinctly profitable as
generic DAG pushes the reverse into the two operands. We effectively
already did this for one operand, but the other was hitting a full
O(LMUL^2) shuffle. Moving that to be O(LMUL/2) operation is a big win.1 parent e1c63bb commit fc10ad1
File tree
2 files changed
+139
-240
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
2 files changed
+139
-240
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5815 | 5815 | | |
5816 | 5816 | | |
5817 | 5817 | | |
| 5818 | + | |
5818 | 5819 | | |
5819 | 5820 | | |
5820 | 5821 | | |
5821 | 5822 | | |
5822 | 5823 | | |
5823 | 5824 | | |
5824 | 5825 | | |
5825 | | - | |
| 5826 | + | |
| 5827 | + | |
5826 | 5828 | | |
5827 | 5829 | | |
5828 | 5830 | | |
| |||
0 commit comments