Skip to content

Commit 5ae9ffb

Browse files
committed
[RISCV] Address review comment from 88062
As pointed out by Fraser, KillSrcReg is always false at this point in code, and having the inconcistency on whether we check the flag between the if and else blocks is confusing.
1 parent 0c7b92a commit 5ae9ffb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ void RISCVRegisterInfo::adjustReg(MachineBasicBlock &MBB,
210210
unsigned Opc = NumOfVReg == 2 ? RISCV::SH1ADD :
211211
(NumOfVReg == 4 ? RISCV::SH2ADD : RISCV::SH3ADD);
212212
BuildMI(MBB, II, DL, TII->get(Opc), DestReg)
213-
.addReg(ScratchReg, RegState::Kill)
214-
.addReg(SrcReg, getKillRegState(KillSrcReg))
213+
.addReg(ScratchReg, RegState::Kill).addReg(SrcReg)
215214
.setMIFlag(Flag);
216215
} else {
217216
TII->mulImm(MF, MBB, II, DL, ScratchReg, NumOfVReg, Flag);

0 commit comments

Comments
 (0)