From: Evan Cheng Date: Wed, 27 Jun 2007 01:16:36 +0000 (+0000) Subject: Fix an obvious bug. Old code only worked for the entry block. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=75611fb4e6ab253be30ac29a2b15e9bf8c1d146e;p=oota-llvm.git Fix an obvious bug. Old code only worked for the entry block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37743 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 34134520d65..ebab85fb480 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -623,10 +623,11 @@ void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB, } exit: - // Alias of a live-in register might not be used at all. - if (isAlias && end == 0) { + // Live-in register might not be used at all. + if (end == MIIdx) { DOUT << " dead"; - end = getDefIndex(start) + 1; + if (isAlias) + end = getDefIndex(MIIdx) + 1; } assert(start < end && "did not find end of interval?");