diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp --- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp @@ -635,6 +635,8 @@ setOperationAction(ISD::VECTOR_REVERSE, VT, Custom); + setOperationAction({ISD::STRICT_FSETCC, ISD::STRICT_FSETCCS}, VT, Legal); + setOperationPromotedToType( ISD::VECTOR_SPLICE, VT, MVT::getVectorVT(MVT::i8, VT.getVectorElementCount())); @@ -894,8 +896,9 @@ setOperationAction(ISD::SETCC, VT, Custom); - setOperationAction({ISD::STRICT_FSETCC, ISD::STRICT_FSETCCS}, VT, - Legal); + if (VT.getVectorElementType() == MVT::i1) + setOperationAction({ISD::STRICT_FSETCC, ISD::STRICT_FSETCCS}, VT, + Legal); setOperationAction(ISD::SELECT, VT, Custom); @@ -1147,6 +1150,9 @@ setLibcallName(RTLIB::FPEXT_F16_F32, "__extendhfsf2"); setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2"); + + // Disable strict node mutation. + IsStrictFPEnabled = true; } EVT RISCVTargetLowering::getSetCCResultType(const DataLayout &DL,