summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-11-15 02:32:22 +0000
committerAndrew Trick <atrick@apple.com>2012-11-15 02:32:22 +0000
commit449eb3f3be77cc127617eaef3087e04a4307e203 (patch)
tree6c71d65073c259c7f101bf169d6a3b60f63fc46a /llvm/lib/CodeGen
parent90ba0218e283af54a5a36898f642f1a3048a24e3 (diff)
downloadbcm5719-llvm-449eb3f3be77cc127617eaef3087e04a4307e203.tar.gz
bcm5719-llvm-449eb3f3be77cc127617eaef3087e04a4307e203.zip
Fix an obvious merge bug in -join-globalcopies (disabled).
Jakub Staszak spotted this in review. I don't notice these things until I manually rerun benchmarks. But reducing unit tests is a very high priority. llvm-svn: 168021
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index df679752860..5d6e0f00adb 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -2080,8 +2080,10 @@ void RegisterCoalescer::joinAllIntervals() {
unsigned CurrDepth = UINT_MAX;
for (unsigned i = 0, e = MBBs.size(); i != e; ++i) {
// Try coalescing the collected local copies for deeper loops.
- if (JoinGlobalCopies && MBBs[i].Depth < CurrDepth)
+ if (JoinGlobalCopies && MBBs[i].Depth < CurrDepth) {
coalesceLocals();
+ CurrDepth = MBBs[i].Depth;
+ }
copyCoalesceInMBB(MBBs[i].MBB);
}
coalesceLocals();
OpenPOWER on IntegriCloud