Skip to content

Commit b8d92e1

Browse files
committed
[RISCV] Fix crash in lowerVPSpliceExperimental with RV64LegalI32.
EVL1 will be i32 and not get type legalized to i64 so we need to manually promote it to XLenVT.
1 parent 82a3214 commit b8d92e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10824,6 +10824,9 @@ RISCVTargetLowering::lowerVPSpliceExperimental(SDValue Op,
1082410824
Mask = convertToScalableVector(MaskVT, Mask, DAG, Subtarget);
1082510825
}
1082610826

10827+
// EVL1 may need to be extended to XLenVT with RV64LegalI32.
10828+
EVL1 = DAG.getNode(ISD::ZERO_EXTEND, DL, XLenVT, EVL1);
10829+
1082710830
bool IsMaskVector = VT.getVectorElementType() == MVT::i1;
1082810831
if (IsMaskVector) {
1082910832
ContainerVT = ContainerVT.changeVectorElementType(MVT::i8);

0 commit comments

Comments
 (0)