Skip to content

Commit 545c1ae

Browse files
committed
[CHERIoT] Eliminate dead code warning
1 parent d2936ec commit 545c1ae

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,9 @@ bool RISCVExpandPseudo::expandAuicgpInstPair(
449449
DebugLoc DL = MI.getDebugLoc();
450450
auto *MF = MBB.getParent();
451451

452-
bool HasTmpReg = MI.getNumOperands() > 2;
452+
assert(MI.getNumOperands() <= 2);
453453
Register DestReg = MI.getOperand(0).getReg();
454-
Register TmpReg = MI.getOperand(HasTmpReg ? 1 : 0).getReg();
455-
const MachineOperand &Symbol = MI.getOperand(HasTmpReg ? 2 : 1);
454+
const MachineOperand &Symbol = MI.getOperand(1);
456455

457456
auto *NewMBB = MBB.getParent()->CreateMachineBasicBlock(MBB.getBasicBlock());
458457

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -13870,7 +13870,6 @@ void RISCVTargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
1387013870
" is a target node!");
1387113871

1387213872
Known.resetAll();
13873-
bool IsRV64 = Subtarget.is64Bit();
1387413873
switch (Opc) {
1387513874
default: break;
1387613875
case RISCVISD::SELECT_CC: {

0 commit comments

Comments
 (0)