Fix c.addi and c.addi16sp immediate constraints which should be non-zero in the range.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Comment inline.
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | ||
---|---|---|
358 ↗ | (On Diff #132327) | Nitpick. Wouldn't be better testing Imm is zero once we know Imm is a constant? return IsConstantImm && (Imm != 0) && isShiftedInt<6, 4>(Imm) && VK == RISCVMCExpr::VK_RISCV_None; |
lib/Target/RISCV/RISCVInstrInfoC.td | ||
103 ↗ | (On Diff #132327) | Same here. |