diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp --- a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp @@ -919,12 +919,21 @@ switch (OpType) { default: llvm_unreachable("Unexpected operand type"); + case RISCVOp::OPERAND_UIMM2: + Ok = isUInt<2>(Imm); + break; + case RISCVOp::OPERAND_UIMM3: + Ok = isUInt<3>(Imm); + break; case RISCVOp::OPERAND_UIMM4: Ok = isUInt<4>(Imm); break; case RISCVOp::OPERAND_UIMM5: Ok = isUInt<5>(Imm); break; + case RISCVOp::OPERAND_UIMM7: + Ok = isUInt<7>(Imm); + break; case RISCVOp::OPERAND_UIMM12: Ok = isUInt<12>(Imm); break;