Skip to content

Commit 154d360

Browse files
committed
[RISCV] Avoid unnecessary MCOperand copies. NFC
1 parent d28b4d8 commit 154d360

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,8 +3437,8 @@ void RISCVAsmParser::emitPseudoExtend(MCInst &Inst, bool SignExtend,
34373437
//
34383438
// SLLI rd, rs, XLEN - Width
34393439
// SR[A|R]I rd, rd, XLEN - Width
3440-
MCOperand DestReg = Inst.getOperand(0);
3441-
MCOperand SourceReg = Inst.getOperand(1);
3440+
const MCOperand &DestReg = Inst.getOperand(0);
3441+
const MCOperand &SourceReg = Inst.getOperand(1);
34423442

34433443
unsigned SecondOpcode = SignExtend ? RISCV::SRAI : RISCV::SRLI;
34443444
int64_t ShAmt = (isRV64() ? 64 : 32) - Width;

0 commit comments

Comments
 (0)