OSDN Git Service

CVP: Improve handling of Selects used as incoming PHI values
authorBjorn Steinbrink <bsteinbr@gmail.com>
Tue, 12 May 2015 22:31:47 +0000 (22:31 +0000)
committerBjorn Steinbrink <bsteinbr@gmail.com>
Tue, 12 May 2015 22:31:47 +0000 (22:31 +0000)
commit1b8b7d61ee330f0e60e5260d6929e2e8953312fb
tree68df9bc611a8c98125180f873af7c47feb8600ce
parent6865b977ae7654be9f2dc6eee04b2e140912e9b2
CVP: Improve handling of Selects used as incoming PHI values

Summary:
If the branch that leads to the PHI node and the Select instruction
depend on correlated conditions, we might be able to directly use the
corresponding value from the Select instruction as the incoming value
for the PHI node, allowing later removal of the select instruction.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9051

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237201 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
test/Transforms/CorrelatedValuePropagation/select.ll [new file with mode: 0644]