[llvm] [indvars] Missing variables at Og: (PR #69920)
    Nikita Popov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct 23 05:33:40 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) {
----------------
nikic wrote:
`isa<SCEVConstant>`.
https://github.com/llvm/llvm-project/pull/69920
    
    
More information about the llvm-commits
mailing list