[llvm] r235734 - Fix LoopInterchange/reductions.ll test for debug builds
Andrew Kaylor
andrew.kaylor at intel.com
Fri Apr 24 10:39:16 PDT 2015
Author: akaylor
Date: Fri Apr 24 12:39:16 2015
New Revision: 235734
URL: http://llvm.org/viewvc/llvm-project?rev=235734&view=rev
Log:
Fix LoopInterchange/reductions.ll test for debug builds
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp?rev=235734&r1=235733&r2=235734&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopInterchange.cpp Fri Apr 24 12:39:16 2015
@@ -1012,8 +1012,8 @@ void LoopInterchangeTransform::restructu
LI->changeTopLevelLoop(OuterLoop, InnerLoop);
}
- for (Loop::iterator I = InnerLoop->begin(), E = InnerLoop->end(); I != E; ++I)
- OuterLoop->addChildLoop(InnerLoop->removeChildLoop(I));
+ while (!InnerLoop->empty())
+ OuterLoop->addChildLoop(InnerLoop->removeChildLoop(InnerLoop->begin()));
InnerLoop->addChildLoop(OuterLoop);
}
More information about the llvm-commits
mailing list