summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-30 23:57:47 +0000
committerDan Gohman <gohman@apple.com>2009-10-30 23:57:47 +0000
commitd814e32e57c52f554caa125bac2be1e90a083947 (patch)
tree32355c316b6f93f00c5bc50f4943ed3395751565 /llvm/lib
parent10eed3788d9663649fe56ac36a52e4df1fffce65 (diff)
downloadbcm5719-llvm-d814e32e57c52f554caa125bac2be1e90a083947.tar.gz
bcm5719-llvm-d814e32e57c52f554caa125bac2be1e90a083947.zip
Don't mark registers dead here when processing nodes with MVT::Flag
results. This works around a problem affecting targets which rely on MVT::Flag to handle physical register defs. llvm-svn: 85638
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index e727bc9f33b..da311eddcae 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -573,7 +573,11 @@ void InstrEmitter::EmitNode(SDNode *Node, bool IsClone, bool IsCloned,
unsigned Reg = II.getImplicitDefs()[i - II.getNumDefs()];
if (Node->hasAnyUseOfValue(i))
EmitCopyFromReg(Node, i, IsClone, IsCloned, Reg, VRBaseMap);
- else
+ // If there are no uses, mark the register as dead now, so that
+ // MachineLICM/Sink can see that it's dead. Don't do this if the
+ // node has a Flag value, for the benefit of targets still using
+ // Flag for values in physregs.
+ else if (Node->getValueType(Node->getNumValues()-1) != MVT::Flag)
MI->addRegisterDead(Reg, TRI);
}
}
OpenPOWER on IntegriCloud