Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit c68965f

Browse files
committed
Work around an assertion that rust is tripping
1 parent f2f37d6 commit c68965f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/CodeGen/InlineSpiller.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,8 @@ foldMemoryOperand(ArrayRef<std::pair<MachineInstr*, unsigned> > Ops,
11051105
MIBundleOperands(FoldMI).analyzePhysReg(Reg, &TRI);
11061106
if (RI.Defines)
11071107
continue;
1108+
if (!MO->isDead())
1109+
continue;
11081110
// FoldMI does not define this physreg. Remove the LI segment.
11091111
assert(MO->isDead() && "Cannot fold physreg def");
11101112
for (MCRegUnitIterator Units(Reg, &TRI); Units.isValid(); ++Units) {

0 commit comments

Comments
 (0)