OSDN Git Service

[InstCombine] Folding of a compare with RHS const should merge debug locations
authorRobert Lougher <rob.lougher@gmail.com>
Wed, 14 Dec 2016 20:27:22 +0000 (20:27 +0000)
committerRobert Lougher <rob.lougher@gmail.com>
Wed, 14 Dec 2016 20:27:22 +0000 (20:27 +0000)
commit133b0bceea54f061d2a4739a4cf93dcc0ece2879
tree59e9acac8313cdb1368ada573f4a0b7ac66ebc6e
parentc023f9db3fa16ecba5b52ed8d55b92012af55a4c
[InstCombine] Folding of a compare with RHS const should merge debug locations

If all the operands to a phi node are compares that have a RHS constant,
instcombine will try to pull them through the phi node, combining them into
a single operation. When it does this, the debug location of the new op
should be the merged debug locations of the phi node arguments.

Patch 8 of 8 for D26256.  Folding of a compare that has a RHS constant.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289704 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombinePHI.cpp
test/DebugInfo/Generic/instcombine-phi.ll