Skip to content

Commit b996f84

Browse files
authored
[RISCV][NFC] Refine MCOperandPredicate code for rtlist. (#76028)
(Imm <= 15) could be implied by isUInt<4>(Imm).
1 parent 3f3c5e5 commit b996f84

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoZc.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ def rlist : Operand<OtherVT> {
5656
int64_t Imm;
5757
if (!MCOp.evaluateAsConstantImm(Imm))
5858
return false;
59-
if (!isUInt<4>(Imm)) return false;
6059
// 0~3 Reserved for EABI
61-
return (Imm >= 4) && (Imm <= 15);
60+
return isUInt<4>(Imm) && Imm >= 4;
6261
}];
6362
}
6463

0 commit comments

Comments
 (0)