From 91203cf87b8a72227c78a9eeae8bb744dfcc4ef0 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 26 Oct 2009 18:26:18 +0000 Subject: [PATCH] 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 , %AL, %EAX where EAX is dead but a subregister of it is still live. This fixes PR5294. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85135 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/ScheduleDAGInstrs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index 43454dd1cbe..880782e2817 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/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)); } } -- 2.34.1