[llvm] [DebugInfo][LoopLoadElim] Fix missing debug location updates (PR #91839)
Shan Huang via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 19:21:48 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 update-debugloc-store
+ // -forwarded.ll checks this.
----------------
Apochens wrote:
I changed underscores in the test name to hyphens.
https://github.com/llvm/llvm-project/pull/91839
More information about the llvm-commits
mailing list