Skip to content

Commit 161c0d5

Browse files
committed
RegisterCoalescer: Remove dubious dropping of implicit virtual register defs
Don't understand why this would either be OK or necessary, but doesn't appear to happen in any tests. This was introduced way back in 76e66c3 https://reviews.llvm.org/D156265
1 parent 02a0b11 commit 161c0d5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CodeGen/RegisterCoalescer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,9 +1396,8 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
13961396
MachineOperand &MO = CopyMI->getOperand(I);
13971397
if (MO.isReg()) {
13981398
assert(MO.isImplicit() && "No explicit operands after implicit operands.");
1399-
// Discard VReg implicit defs.
1400-
if (MO.getReg().isPhysical())
1401-
ImplicitOps.push_back(MO);
1399+
assert(MO.getReg().isPhysical() && "unexpected implicit virtual register def");
1400+
ImplicitOps.push_back(MO);
14021401
}
14031402
}
14041403

0 commit comments

Comments
 (0)