[SimplifyCFG] In sinkLastInstruction correctly set debugloc of "common" inst
authorRobert Lougher <rob.lougher@gmail.com>
Thu, 15 Dec 2016 16:17:53 +0000 (16:17 +0000)
committerRobert Lougher <rob.lougher@gmail.com>
Thu, 15 Dec 2016 16:17:53 +0000 (16:17 +0000)
commitcf1767421140616e436338477c3560665de1f5fd
tree327f0f6f58a852980acf1841cc2474dac492eaf7
parent6cbfce77857689da66ba10b1e03f41f44ef98eb8
[SimplifyCFG] In sinkLastInstruction correctly set debugloc of "common" inst

Simplify CFG will try to sink the last instruction in a series of basic blocks,
creating a "common" instruction in the successor block (sinkLastInstruction).
When it does this, the debug location of the single instruction should be the
merged debug locations of the commoned instructions.

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

llvm-svn: 289828
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/DebugInfo/Generic/simplifycfg_sink_last_inst.ll [new file with mode: 0644]