[llvm-commits] [llvm] r108061 - /llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Jul 10 15:42:53 PDT 2010


Author: stoklund
Date: Sat Jul 10 17:42:53 2010
New Revision: 108061

URL: http://llvm.org/viewvc/llvm-project?rev=108061&view=rev
Log:
Only collect subreg extracting copies for later coalescing.
This also avoids fatal copies from physregs.

Modified:
    llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp

Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=108061&r1=108060&r2=108061&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Sat Jul 10 17:42:53 2010
@@ -1434,7 +1434,7 @@
       IsImpDef = false;
 
       // Remember COPY sources. These might be candidate for coalescing.
-      if (DefMI->isCopy())
+      if (DefMI->isCopy() && DefMI->getOperand(1).getSubReg())
         RealSrcs.push_back(DefMI->getOperand(1).getReg());
 
       if (!Seen.insert(SrcReg) ||





More information about the llvm-commits mailing list