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

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Jun 18 16:10:20 PDT 2010


Author: stoklund
Date: Fri Jun 18 18:10:20 2010
New Revision: 106345

URL: http://llvm.org/viewvc/llvm-project?rev=106345&view=rev
Log:
Only run CoalesceExtSubRegs when we can expect LiveIntervalAnalysis to clean up
the inserted INSERT_SUBREGs after us.

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=106345&r1=106344&r2=106345&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Fri Jun 18 18:10:20 2010
@@ -1397,8 +1397,11 @@
       MI->eraseFromParent();
     }
 
-    // Try coalescing some EXTRACT_SUBREG instructions.
-    CoalesceExtSubRegs(RealSrcs, DstReg);
+    // Try coalescing some EXTRACT_SUBREG instructions. This can create
+    // INSERT_SUBREG instructions that must have <undef> flags added by
+    // LiveIntervalAnalysis, so only run it when LiveVariables is available.
+    if (LV)
+      CoalesceExtSubRegs(RealSrcs, DstReg);
   }
 
   RegSequences.clear();





More information about the llvm-commits mailing list