[llvm] [DebugInfo][LoopLoadElim] Fix missing debug location updates (PR #91839)
J. Ryan Stinnett via llvm-commits
llvm-commits at lists.llvm.org
Sat May 11 08:53:07 PDT 2024
================
@@ -448,6 +448,10 @@ class LoadEliminationForLoop {
new LoadInst(Cand.Load->getType(), InitialPtr, "load_initial",
/* isVolatile */ false, Cand.Load->getAlign(),
PH->getTerminator()->getIterator());
+ // We don't give any debug location to Initial, because it is inserted
+ // into the loop's preheader. A debug location inside the loop will cause
+ // a misleading stepping when debugging. The test preserving-debugloc-store
----------------
jryans wrote:
Hmm, is this an existing test somewhere? Or maybe it's meant to be attached to this PR...? I don't see it in the file list currently.
https://github.com/llvm/llvm-project/pull/91839
More information about the llvm-commits
mailing list