[llvm] [InstCombine][DebugInfo] Update debug value uses in `freelyInvertAllUsersOf` (PR #137013)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 03:58:39 PDT 2025


dtcxzyw wrote:

> Interesting - so this is a case where we generate incorrect locations (without your patch). Out of curiosity, are you able to share how you found the bug?

It was reported by @hemangdash: https://github.com/llvm/llvm-project/issues?q=is%3Aissue%20author%3Ahemangdash%20 I guess the original program was generated by csmith.

> I agree the case you fixed looks like it was wrong before, but I'm worried the fix is too broad - e.g. does this case work with your patch?

Yes, it is still correct with this patch. In this case, InstCombine calls `freelyInvertAllUsersOf(%cmp)`. But `%cmp` is not used by any `#dbg_value`.


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


More information about the llvm-commits mailing list