mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Fix for PR18396: Assertion: MO->isDead "Cannot fold physreg def".
InlineSpiller::foldMemoryOperand needs to handle undef call operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198679 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1098,12 +1098,11 @@ foldMemoryOperand(ArrayRef<std::pair<MachineInstr*, unsigned> > Ops,
|
||||
MRI.isReserved(Reg)) {
|
||||
continue;
|
||||
}
|
||||
// Skip non-Defs, including undef uses and internal reads.
|
||||
if (MO->isUse())
|
||||
continue;
|
||||
MIBundleOperands::PhysRegInfo RI =
|
||||
MIBundleOperands(FoldMI).analyzePhysReg(Reg, &TRI);
|
||||
if (MO->readsReg()) {
|
||||
assert(RI.Reads && "Cannot fold physreg reader");
|
||||
continue;
|
||||
}
|
||||
if (RI.Defines)
|
||||
continue;
|
||||
// FoldMI does not define this physreg. Remove the LI segment.
|
||||
|
||||
Reference in New Issue
Block a user