diff options
-rw-r--r-- | lib/CodeGen/RegisterCoalescer.cpp | 4 |
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(); |