]> granicus.if.org Git - llvm/commit
[InstCombine] Merge DebugLoc when speculatively hoisting store instruction
authorTaewook Oh <twoh@fb.com>
Sat, 28 Jan 2017 07:05:43 +0000 (07:05 +0000)
committerTaewook Oh <twoh@fb.com>
Sat, 28 Jan 2017 07:05:43 +0000 (07:05 +0000)
commit647e08195b3cd45cee0059fe8bb0a07b504006ec
treeddaf978232a92a53f898afa4fad6243828505d4b
parent0439ed6e3d9fb3b9bac170985d8d95867d7a7fd5
[InstCombine] Merge DebugLoc when speculatively hoisting store instruction

Summary: Along with https://reviews.llvm.org/D27804, debug locations need to be merged when hoisting store instructions as well. Not sure if just dropping debug locations would make more sense for this case, but as the branch instruction will have at least different discriminator with the hoisted store instruction, I think there will be no difference in practice.

Reviewers: aprantl, andreadb, danielcdh

Reviewed By: aprantl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293372 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/remove-debug-2.ll [new file with mode: 0644]