| Issue |
79332
|
| Summary |
[RISCV] Extra vmerge in shuffle lowering could be replaced with passthru operand and VL
|
| Labels |
backend:RISC-V
|
| Assignees |
lukel97
|
| Reporter |
lukel97
|
We currently lower
```llvm
%shuffle = shufflevector <4 x i64> %0, <4 x i64> %1, <4 x i32> <i32 2, i32 3, i32 6, i32 7>
```
To something like this:
```asm
vsetivli zero, 4, e64, m1, ta, ma
vmv.v.i v0, 12
vslidedown.vi v8, v8, 2
vmerge.vvm v8, v8, v9, v0
```
The vmerge mask is `0b1100`, which could be emulated by using the passthru on the `vslidedown.vi` and setting VL:
```asm
vsetivli zero, 2, e64, m1, ta, ma
vslidedown.vi v9, v8, 2
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs