[llvm-branch-commits] [llvm-branch] r102028 - in /llvm/branches/Apple/Morbo: lib/CodeGen/SimpleRegisterCoalescing.cpp test/CodeGen/X86/2010-04-21-CoalescerBug.ll

Evan Cheng evan.cheng at apple.com
Wed Apr 21 14:05:05 PDT 2010


Author: evancheng
Date: Wed Apr 21 16:05:05 2010
New Revision: 102028

URL: http://llvm.org/viewvc/llvm-project?rev=102028&view=rev
Log:
Merge 102027

Added:
    llvm/branches/Apple/Morbo/test/CodeGen/X86/2010-04-21-CoalescerBug.ll
      - copied unchanged from r102027, llvm/trunk/test/CodeGen/X86/2010-04-21-CoalescerBug.ll
Modified:
    llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp

Modified: llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=102028&r1=102027&r2=102028&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/CodeGen/SimpleRegisterCoalescing.cpp Wed Apr 21 16:05:05 2010
@@ -803,7 +803,8 @@
           CopySrcReg == SrcReg && CopyDstReg != UseDstReg) {
         // If the use is a copy and it won't be coalesced away, and its source
         // is defined by a trivial computation, try to rematerialize it instead.
-        if (ReMaterializeTrivialDef(li_->getInterval(SrcReg), CopyDstReg,
+        if (!JoinedCopies.count(UseMI) &&
+            ReMaterializeTrivialDef(li_->getInterval(SrcReg), CopyDstReg,
                                     CopyDstSubIdx, UseMI))
           continue;
       }





More information about the llvm-branch-commits mailing list