| Issue |
243365
|
| Summary |
[RISC-V][P-ext] Assertion failure when legalizing vector right shifts on RV32
|
| Labels |
backend:RISC-V,
crash-on-valid
|
| Assignees |
zeyi2
|
| Reporter |
zeyi2
|
This appears to have been exposed by #242773.
The following IR triggers an assertion with RV32 and the experimental P extension:
```llvm
define <1 x i64> @test(<1 x i32> %x, <1 x i1> %s) {
%a = zext <1 x i32> %x to <1 x i64>
%wide = zext <1 x i1> %s to <1 x i64>
%r = lshr <1 x i64> %a, %wide
ret <1 x i64> %r
}
```
Reproducer: https://godbolt.org/z/WG71Wj73d
Command:
```sh
llc -mtriple=riscv32 -mattr=+experimental-p test.ll
```
Assertion in `RISCVTargetLowering::LowerOperation`:
```text
Op.getOperand(1).getValueType() == MVT::i32 && Subtarget.is64Bit() &&
"Unexpected custom legalisation"
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs