[llvm-commits] [llvm] r119791 - /llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Nov 18 21:45:24 PST 2010


Author: stoklund
Date: Thu Nov 18 23:45:24 2010
New Revision: 119791

URL: http://llvm.org/viewvc/llvm-project?rev=119791&view=rev
Log:
Don't attempt trivial coalescing for sub-register copies.

Patch by Krister Wombell!

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

Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=119791&r1=119790&r2=119791&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Thu Nov 18 23:45:24 2010
@@ -466,6 +466,10 @@
       CandReg = CopyMI->getOperand(0).getReg();
     else
       return Reg;
+
+    // If the target of the copy is a sub-register then don't coalesce.
+    if(CopyMI->getOperand(0).getSubReg())
+      return Reg;
   }
 
   if (TargetRegisterInfo::isVirtualRegister(CandReg)) {





More information about the llvm-commits mailing list