]> granicus.if.org Git - llvm/commit
[DebugInfo] Remove un-necessary logic from HoistThenElseCodeToIf
authorJeremy Morse <jeremy.morse.llvm@gmail.com>
Mon, 14 Jan 2019 12:13:12 +0000 (12:13 +0000)
committerJeremy Morse <jeremy.morse.llvm@gmail.com>
Mon, 14 Jan 2019 12:13:12 +0000 (12:13 +0000)
commit8f2514f11615b32b861bd503c826a599b37bd220
tree23099c31d63f901147790b321b777e12ccc7beb9
parentfc46ecd5d4c4ef7073e3d090e4e0916ff6a7456e
[DebugInfo] Remove un-necessary logic from HoistThenElseCodeToIf

Following PR39807, the way in which SimplifyCFG hoists common code on
branch paths was fixed in r347782. However this left extra code hanging
around HoistThenElseCodeToIf that wasn't necessary and needlessly
complicated matters -- we no longer need to look up through the 'if'
basic block to find a location for hoisted 'select' insts, we can instead
use the location chosen by applyMergedLocation.

This patch deletes that extra logic, and updates a regression test to
reflect the new logic (selects get the merged location, not a previous
insts location).

Differential Revision: https://reviews.llvm.org/D55272

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351058 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/CodeGen/X86/pr39187-g.ll