diff options
Diffstat (limited to 'llvm/lib/Target/RISCV/RISCVInstrInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/RISCV/RISCVInstrInfo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp index 2723229859a5..64f9e3eb8d86 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp @@ -2806,7 +2806,7 @@ bool RISCVInstrInfo::verifyInstruction(const MachineInstr &MI, CASE_OPERAND_UIMM(7) CASE_OPERAND_UIMM(8) CASE_OPERAND_UIMM(9) - CASE_OPERAND_UIMM(10) + CASE_OPERAND_UIMM(10) CASE_OPERAND_UIMM(12) CASE_OPERAND_UIMM(16) CASE_OPERAND_UIMM(20) @@ -2823,6 +2823,9 @@ bool RISCVInstrInfo::verifyInstruction(const MachineInstr &MI, case RISCVOp::OPERAND_UIMM5_NONZERO: Ok = isUInt<5>(Imm) && (Imm != 0); break; + case RISCVOp::OPERAND_UIMM5_GT3: + Ok = isUInt<5>(Imm) && (Imm > 3); + break; case RISCVOp::OPERAND_UIMM5_PLUS1: Ok = (isUInt<5>(Imm) && (Imm != 0)) || (Imm == 32); break; @@ -4809,6 +4812,8 @@ bool RISCV::isVLKnownLE(const MachineOperand &LHS, const MachineOperand &RHS) { return true; if (RHS.isImm() && RHS.getImm() == RISCV::VLMaxSentinel) return true; + if (LHS.isImm() && LHS.getImm() == 0) + return true; if (LHS.isImm() && LHS.getImm() == RISCV::VLMaxSentinel) return false; if (!LHS.isImm() || !RHS.isImm()) |
