[PeepholeOptimizer] Remove dead code

At this point we have already ruled out all def operands, so we can't
possibly see a dead implicit def operand.
This commit is contained in:
Jay Foad 2020-08-20 16:47:30 +01:00
parent 2017b8f59b
commit fe2d2102d1

View File

@ -1357,9 +1357,6 @@ bool PeepholeOptimizer::foldImmediate(
MachineOperand &MO = MI.getOperand(i);
if (!MO.isReg() || MO.isDef())
continue;
// Ignore dead implicit defs.
if (MO.isImplicit() && MO.isDead())
continue;
Register Reg = MO.getReg();
if (!Reg.isVirtual())
continue;