[DebugInfo] Replace debug uses in replaceUsesOutsideBlock
authorOCHyams <orlando.hyams@sony.com>
Mon, 19 Apr 2021 09:31:41 +0000 (10:31 +0100)
committerOCHyams <orlando.hyams@sony.com>
Mon, 19 Apr 2021 10:06:53 +0000 (11:06 +0100)
commitbbccdf6f81979c0707c6ce25bf7c70be82e2629a
tree22b45dd759f456eead02b86e23573b0288d021b9
parent31686d13dc584459ecc3fc253cc243a84317221a
[DebugInfo] Replace debug uses in replaceUsesOutsideBlock

Value::replaceUsesOutsideBlock doesn't replace debug uses which leads to an
unnecessary reduction in variable location coverage. Fix this, add a unittest for
it, and add a regression test demonstrating the change through instcombine's
replacedSelectWithOperand.

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D99169
llvm/lib/IR/Value.cpp
llvm/test/DebugInfo/Generic/instcombine-replaced-select-with-operand.ll [new file with mode: 0644]
llvm/unittests/IR/ValueTest.cpp