summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-08-02 05:29:38 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-08-02 05:29:38 +0000
commit358c3d1dac31258ba8af1e53646e17bfb4880ddb (patch)
treec20606b20d1adf4e4c3f9cd85e0a87c42e5adfcf /llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
parent824693c87a4244fed86c1aa8f26e905933e77739 (diff)
downloadbcm5719-llvm-358c3d1dac31258ba8af1e53646e17bfb4880ddb.tar.gz
bcm5719-llvm-358c3d1dac31258ba8af1e53646e17bfb4880ddb.zip
Do not emit copies for physical register output if it's not used.
llvm-svn: 40722
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 3738702dc8d..192b0767e36 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -676,7 +676,8 @@ void ScheduleDAG::EmitNode(SDNode *Node,
if (HasPhysRegOuts) {
for (unsigned i = II.numDefs; i < NumResults; ++i) {
unsigned Reg = II.ImplicitDefs[i - II.numDefs];
- EmitCopyFromReg(Node, i, Reg, VRBaseMap);
+ if (Node->hasAnyUseOfValue(i))
+ EmitCopyFromReg(Node, i, Reg, VRBaseMap);
}
}
} else {
OpenPOWER on IntegriCloud