If we can't avoid running loop-simplify twice for now, at least avoid running
[oota-llvm.git] / lib / Transforms / Scalar / LoopStrengthReduce.cpp
index 01dcfaf06527f17b200c9eecca7c06993c8e9311..ac4aea2e404eed5adb5b8c4f55f454c473575f4c 100644 (file)
@@ -3824,6 +3824,9 @@ void LoopStrengthReduce::getAnalysisUsage(AnalysisUsage &AU) const {
   AU.addPreserved<DominatorTree>();
   AU.addRequired<ScalarEvolution>();
   AU.addPreserved<ScalarEvolution>();
+  // Requiring LoopSimplify a second time here prevents IVUsers from running
+  // twice, since LoopSimplify was invalidated by running ScalarEvolution.
+  AU.addRequiredID(LoopSimplifyID);
   AU.addRequired<IVUsers>();
   AU.addPreserved<IVUsers>();
 }