[DebugInfo][RemoveDIs] Prevent duplicate DPValues from being returned by findDbgIntrinsics (#82764)
Fixes the error described here: https://github.com/llvm/llvm-project/commit/a93a4ec7dd205b965ee5597314bb376520cd736c#commitcomment-138965199 The function `findDbgIntrinsics` is used to return a list of debug intrinsics and DPValues that use a given value, with the intent that no duplicates are returned in either list. For DPValues, we've guarded against DPValues that use a value multiple times as part of a DIArgList, but we have not guarded against DPValues that use a value multiple times as separate operands (currently only possible for `dbg_assign`s, something I missed in my implementation of that type!). This patch adds a guard, and also updates a test to cover this case.
parent
ec95379d
Please register or sign in to comment