aboutsummaryrefslogtreecommitdiff
path: root/lib
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
commitc6d6aeb95feca2efc6ee652555dbb29f0a3d41c8 (patch)
tree2f85c56bcd64b60201a23f0c27734c5894e78870 /lib
parent6b88e2a1474cfc3cb88a6f0da68d77f42c87a99d (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/RegisterCoalescer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp
index df67975286..5d6e0f00ad 100644
--- a/lib/CodeGen/RegisterCoalescer.cpp
+++ b/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();