Skip to content

Commit 1147090

Browse files
toppercgithub-actions[bot]
authored andcommitted
Automerge: [RISCV] Remove X26 from encodeRlist. NFC
The caller already checks X26 and generates its own error.
2 parents fe4a71a + a085da6 commit 1147090

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,8 +2753,7 @@ ParseStatus RISCVAsmParser::parseReglist(OperandVector &Operands) {
27532753
RegEnd = RegStart;
27542754

27552755
auto Encode = RISCVZC::encodeRlist(RegEnd, IsEABI);
2756-
if (Encode == RISCVZC::INVALID_RLIST)
2757-
return Error(S, "invalid register list");
2756+
assert(Encode != RISCVZC::INVALID_RLIST);
27582757
Operands.push_back(RISCVOperand::createRlist(Encode, S));
27592758

27602759
return ParseStatus::Success;

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,6 @@ inline unsigned encodeRlist(MCRegister EndReg, bool IsRV32E = false) {
617617
return RLISTENCODE::RA_S0_S8;
618618
case RISCV::X25:
619619
return RLISTENCODE::RA_S0_S9;
620-
case RISCV::X26:
621-
return RLISTENCODE::INVALID_RLIST;
622620
case RISCV::X27:
623621
return RLISTENCODE::RA_S0_S11;
624622
default:

0 commit comments

Comments
 (0)