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 @@ -4683,7 +4683,10 @@ assert(Opcode > RISCVISD::FIRST_NUMBER && Opcode <= RISCVISD::STRICT_VFROUND_NOEXCEPT_VL && "not a RISC-V target specific op"); - assert(RISCVISD::STRICT_VFROUND_NOEXCEPT_VL - RISCVISD::FIRST_NUMBER == 421 && + assert(RISCVISD::VFIRST_VL - RISCVISD::FIRST_NUMBER == 177 && + RISCVISD::STRICT_VFROUND_NOEXCEPT_VL - + ISD::FIRST_TARGET_STRICTFP_OPCODE == + 21 && "adding target specific op should update this function"); if (Opcode >= RISCVISD::ADD_VL && Opcode <= RISCVISD::FMAXNUM_VL) return true; @@ -4701,7 +4704,10 @@ assert(Opcode > RISCVISD::FIRST_NUMBER && Opcode <= RISCVISD::STRICT_VFROUND_NOEXCEPT_VL && "not a RISC-V target specific op"); - assert(RISCVISD::STRICT_VFROUND_NOEXCEPT_VL - RISCVISD::FIRST_NUMBER == 421 && + assert(RISCVISD::VFIRST_VL - RISCVISD::FIRST_NUMBER == 177 && + RISCVISD::STRICT_VFROUND_NOEXCEPT_VL - + ISD::FIRST_TARGET_STRICTFP_OPCODE == + 21 && "adding target specific op should update this function"); if (Opcode >= RISCVISD::TRUNCATE_VECTOR_VL && Opcode <= RISCVISD::SETCC_VL) return true;