Fixes the bug: https://bugs.llvm.org/show_bug.cgi?id=39339
When basic blocks are killed, either due to being empty or to being an if.then or if.else block whose complement contains identical instructions, the debug intrinsics in that block are lost. This fix attempts to recover those intrinsics by either hoisting or sinking them if possible, or replacing them in the above block with Undef values to prevent debug info from falling out-of-date.
That comment is a bit vague for DebugInfoMetadata.
Does this represent exactly one non-overlapping fragment of an inlined instance of a variable? We should say so. Since this isn't used anywhere in this file, there should be an example for when to use this.