[llvm] [NFC] Move RemoveRedundantDbgInstrs outside of inner loop in JumpThreading (PR #123008)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 03:44:07 PST 2025


SLTozer wrote:

> Why should duplicated debug value be preserved for the first case (before first call to f1)?

They shouldn't be - looking at your changes and assuming that you're seeing the test fail with the removal of those intrinsics, I'd guess that the redundant dbg_values end up together as a result of modifications that InstCombine makes _after_ the last cleanup during the final iteration of the loop. Now that you've moved the cleanup to the very end, the redundant dbg_values are being observed by the cleanup step and removed.

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


More information about the llvm-commits mailing list