From: Evan Cheng Date: Tue, 9 Oct 2007 23:36:27 +0000 (+0000) Subject: Fix an extremely stupid bug that prevented first round of coalescing (physical regist... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5edc57fa426837fd745bcf7265f008f98b2c5393;p=oota-llvm.git Fix an extremely stupid bug that prevented first round of coalescing (physical registers only) from happening. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42820 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp index 5ef838c33a0..4c1a96dd7d1 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -861,7 +861,8 @@ void SimpleRegisterCoalescing::CopyCoalesceInMBB(MachineBasicBlock *MBB, unsigned SrcReg, DstReg; if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue; - if (TryAgain && !JoinCopy(Inst, SrcReg, DstReg, PhysOnly)) + bool Success = JoinCopy(Inst, SrcReg, DstReg, PhysOnly); + if (TryAgain && !Success) TryAgain->push_back(getCopyRec(Inst, SrcReg, DstReg)); } }