summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-26 18:26:18 +0000
committerDan Gohman <gohman@apple.com>2009-10-26 18:26:18 +0000
commit9aba0d9988c6d3056ed4e3628934c29943888bc7 (patch)
tree7fd591cc6fa83d5ea84ae8c9e61830bd4be6b5d3 /llvm/lib/CodeGen
parent752aea6513b933c5a1a2addc98e720b916467945 (diff)
downloadbcm5719-llvm-9aba0d9988c6d3056ed4e3628934c29943888bc7.tar.gz
bcm5719-llvm-9aba0d9988c6d3056ed4e3628934c29943888bc7.zip
When checking whether a def of an aliased register is dead, ask the
machineinstr whether the aliased register is dead, rather than the original register is dead. This allows it to get the correct answer when examining an instruction like this: CALLpcrel32 <ga:foo>, %AL<imp-def>, %EAX<imp-def,dead> where EAX is dead but a subregister of it is still live. This fixes PR5294. llvm-svn: 85135
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/ScheduleDAGInstrs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
index 43454dd1cbe..880782e2817 100644
--- a/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
+++ b/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
@@ -208,7 +208,7 @@ void ScheduleDAGInstrs::BuildSchedGraph(AliasAnalysis *AA) {
SUnit *DefSU = DefList[i];
if (DefSU != SU &&
(Kind != SDep::Output || !MO.isDead() ||
- !DefSU->getInstr()->registerDefIsDead(Reg)))
+ !DefSU->getInstr()->registerDefIsDead(*Alias)))
DefSU->addPred(SDep(SU, Kind, AOLatency, /*Reg=*/ *Alias));
}
}
OpenPOWER on IntegriCloud