[RISCV] Only custom legalize i32 arguments to vector intrinsics on RV64.

This commit is contained in:
Craig Topper 2020-12-15 13:34:04 -08:00
parent 95019de8a1
commit 028efac2d7
1 changed files with 5 additions and 2 deletions

View File

@ -340,9 +340,12 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
if (Subtarget.hasStdExtV()) {
setBooleanVectorContents(ZeroOrOneBooleanContent);
// RVV intrinsics may have illegal operands.
for (auto VT : {MVT::i8, MVT::i16, MVT::i32})
setOperationAction(ISD::INTRINSIC_WO_CHAIN, VT, Custom);
setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i8, Custom);
setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i16, Custom);
if (Subtarget.is64Bit())
setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::i32, Custom);
}
// Function alignments.