[llvm-commits] [llvm] r147683 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp

Andrew Trick atrick at apple.com
Fri Jan 6 13:23:43 PST 2012


Author: atrick
Date: Fri Jan  6 15:23:43 2012
New Revision: 147683

URL: http://llvm.org/viewvc/llvm-project?rev=147683&view=rev
Log:
SCEVExpander: hoistStep should check strict dominance.

Modified:
    llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp

Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=147683&r1=147682&r2=147683&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Fri Jan  6 15:23:43 2012
@@ -1564,7 +1564,7 @@
   for (User::op_iterator OI = IncV->op_begin(), OE = IncV->op_end();
        OI != OE; ++OI) {
     Instruction *OInst = dyn_cast<Instruction>(OI);
-    if (OInst && !DT->dominates(OInst, InsertPos))
+    if (OInst && (OInst == InsertPos || !DT->dominates(OInst, InsertPos)))
       return false;
   }
   IncV->moveBefore(InsertPos);





More information about the llvm-commits mailing list