[PATCH] D153392: [PhaseOrdering] Don't speculate blocks in simplifycfg before jump-threading
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 09:45:19 PDT 2023
aeubanks added a comment.
I've also found that
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 40475d9563b2..dee3a1308405 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -2064,6 +2064,8 @@ PreservedAnalyses IndVarSimplifyPass::run(Loop &L, LoopAnalysisManager &AM,
if (!IVS.run(&L))
return PreservedAnalyses::all();
+ AR.SE.forgetLoop(&L);
+
auto PA = getLoopPassPreservedAnalyses();
PA.preserveSet<CFGAnalyses>();
if (AR.MSSA)
fixes the issue and allows loop-unroll-full to see the proper trip count. I'm not familiar with SCEV caching, is this a stale analysis issue?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153392/new/
https://reviews.llvm.org/D153392
More information about the llvm-commits
mailing list