[llvm-commits] [llvm] r86193 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Dan Gohman gohman at apple.com
Thu Nov 5 15:34:59 PST 2009


Author: djg
Date: Thu Nov  5 17:34:59 2009
New Revision: 86193

URL: http://llvm.org/viewvc/llvm-project?rev=86193&view=rev
Log:
Teach LSR to avoid calling SplitCriticalEdge on edges with indirectbr.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=86193&r1=86192&r2=86193&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu Nov  5 17:34:59 2009
@@ -490,6 +490,7 @@
         // is the canonical backedge for this loop, as this can make some
         // inserted code be in an illegal position.
         if (e != 1 && PHIPred->getTerminator()->getNumSuccessors() > 1 &&
+            !isa<IndirectBrInst>(PHIPred->getTerminator()) &&
             (PN->getParent() != L->getHeader() || !L->contains(PHIPred))) {
 
           // First step, split the critical edge.





More information about the llvm-commits mailing list