revert my previous change, it exposed other problems.
authorChris Lattner <sabre@nondot.org>
Sat, 11 Feb 2006 08:47:47 +0000 (08:47 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 11 Feb 2006 08:47:47 +0000 (08:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26121 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LoopSimplify.cpp

index c76e501af8287ab97f74a6a42af6b735464a2fba..a8aa0e0bbcc8077233e68706d2db7ddcf3ddb819 100644 (file)
@@ -169,7 +169,7 @@ bool LoopSimplify::ProcessLoop(Loop *L) {
          PI != PE; ++PI)
       // Must be exactly this loop: no subloops, parent loops, or non-loop preds
       // allowed.
-      if (LI.getLoopFor(*PI) != L) {
+      if (!L->contains(*PI)) {
         RewriteLoopExitBlock(L, ExitBlock);
         NumInserted++;
         Changed = true;