[GVN] Partially revert debug info salvage change (r325063)
authorVedant Kumar <vsk@apple.com>
Fri, 16 Feb 2018 01:15:20 +0000 (01:15 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 16 Feb 2018 01:15:20 +0000 (01:15 +0000)
commit616fdb00dfe09c889980ef6d42b98ee67b2694c4
treeb68215e5ca4062711324f77b28834eb62dda6704
parent65b620be8a63c8dee5225562a43c6dfc827394a7
[GVN] Partially revert debug info salvage change (r325063)

In r325063, we salvaged debug values from dying instructions in
GVN::processBlock() and GVN::performScalarPRE().

The change in performScalarPRE(), while correct, is unhelpful. It
introduced a call to salvageDebugInfo() which was immediately followed
by a RAUW, meaning it prevented the RAUW from efficiently updating
dbg.value intrinsics.  This commit reverts the mistake and tightens up
the affected test case.

llvm-svn: 325308
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/test/Transforms/GVN/PRE/phi-translate-2.ll