Fix another dominator update bug. These bugs keep getting exposed because GCSE
authorChris Lattner <sabre@nondot.org>
Thu, 5 Feb 2004 23:20:59 +0000 (23:20 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 5 Feb 2004 23:20:59 +0000 (23:20 +0000)
keeps finding more code motion opportunities now that the dominators are correct!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11142 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LoopSimplify.cpp

index 53c8542b14366fff7e464acf312c67964a10f4a8..00ee59d177a3505292f94c7313b43f2f7aeafe18 100644 (file)
@@ -516,7 +516,7 @@ void LoopSimplify::UpdateDomInfoForRevectoredPreds(BasicBlock *NewBB,
     if (NewBBDominatesNewBBSucc)
       for (pred_iterator PI = pred_begin(NewBBSucc), E = pred_end(NewBBSucc);
            PI != E; ++PI)
-        if (*PI != NewBB && !DS.dominates(OnePred, *PI)) {
+        if (*PI != NewBB && !DS.dominates(NewBBSucc, *PI)) {
           NewBBDominatesNewBBSucc = false;
           break;
         }