From 9d615d1e70f08a037870c330e99a226a6da0a912 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 2 Mar 2007 10:41:15 +0000 Subject: [PATCH] Dead live-in detection bug. llvm-svn: 34843 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index a5907d6067e2..26d741f6898b 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -938,11 +938,11 @@ bool LiveIntervals::JoinCopy(MachineInstr *CopyMI, if (JoinIntervals(DestInt, SrcInt)) { if (isDead) { // Result of the copy is dead. Propagate this property. - if (SrcStart == 0 && MRegisterInfo::isPhysicalRegister(SrcReg)) { + if (SrcStart == 0 && MRegisterInfo::isPhysicalRegister(repSrcReg)) { // Live-in to the function but dead. Remove it from MBB live-in set. // JoinIntervals may end up swapping the two intervals. MachineBasicBlock *MBB = CopyMI->getParent(); - MBB->removeLiveIn(SrcReg); + MBB->removeLiveIn(repSrcReg); } else { MachineInstr *SrcMI = getInstructionFromIndex(SrcStart); if (SrcMI) {