aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-10-09 23:36:27 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-10-09 23:36:27 +0000
commit5edc57fa426837fd745bcf7265f008f98b2c5393 (patch)
treeb09b2777e085d78ccdc23f15869aa5c9d02422af /lib/CodeGen/SimpleRegisterCoalescing.cpp
parent80fe9e8459514670b6683e8c005367fd1af3a7e8 (diff)
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
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 5ef838c33a..4c1a96dd7d 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));
}
}