summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/InlineSpiller.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2014-01-07 07:31:10 +0000
committerAndrew Trick <atrick@apple.com>2014-01-07 07:31:10 +0000
commitdfacda363549778e07c92fc707298a5317c901ab (patch)
tree106755721ca44f42de330ca0039a4d6384f1a4f7 /llvm/lib/CodeGen/InlineSpiller.cpp
parente4a18605e0c56750aa999be92a41b88497460949 (diff)
downloadbcm5719-llvm-dfacda363549778e07c92fc707298a5317c901ab.tar.gz
bcm5719-llvm-dfacda363549778e07c92fc707298a5317c901ab.zip
Fix for PR18396: Assertion: MO->isDead "Cannot fold physreg def".
InlineSpiller::foldMemoryOperand needs to handle undef call operands. llvm-svn: 198679
Diffstat (limited to 'llvm/lib/CodeGen/InlineSpiller.cpp')
-rw-r--r--llvm/lib/CodeGen/InlineSpiller.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp
index bb0e6423135..70d97c0f55d 100644
--- a/llvm/lib/CodeGen/InlineSpiller.cpp
+++ b/llvm/lib/CodeGen/InlineSpiller.cpp
@@ -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.
OpenPOWER on IntegriCloud