[llvm] [indvars] Missing variables at Og: (PR #69920)
Carlos Alberto Enciso via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 03:45:12 PDT 2023
================
@@ -1931,6 +1932,30 @@ bool IndVarSimplify::run(Loop *L) {
}
}
+ // The loop exit values have been updated; insert the debug location
+ // for the induction variable with its final value.
+ if (PHINode *IndVar = L->getInductionVariable(*SE)) {
+ const SCEV *IndVarSCEV = SE->getSCEVAtScope(IndVar, L->getParentLoop());
+ if (IndVarSCEV->getSCEVType() == SCEVTypes::scConstant) {
----------------
CarlosAlbertoEnciso wrote:
Replaced.
https://github.com/llvm/llvm-project/pull/69920
More information about the llvm-commits
mailing list