[llvm] [indvars] Missing variables at Og: (PR #69920)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 05:46:14 PST 2024


================
@@ -1482,6 +1513,21 @@ int llvm::rewriteLoopExitValues(Loop *L, LoopInfo *LI, TargetLibraryInfo *TLI,
           (isa<PHINode>(Inst) || isa<LandingPadInst>(Inst)) ?
           &*Inst->getParent()->getFirstInsertionPt() : Inst;
         RewritePhiSet.emplace_back(PN, i, ExitValue, InsertPt, HighCost);
+
+        // Add debug values if the PN is a induction variable.
----------------
nikic wrote:

Why is this code needed in addition to the addDebugValuesToLoopVariable() below?

https://github.com/llvm/llvm-project/pull/69920


More information about the llvm-commits mailing list