CVP: If we have a PHI with an incoming select, try to skip the select.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 24 Feb 2013 15:34:43 +0000 (15:34 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 24 Feb 2013 15:34:43 +0000 (15:34 +0000)
commite8aa36a4afa02dde89e10f39b6ca87cfe1949dd8
tree44fe42e2141234cf5a22c60ec2305ac878335d0d
parentbd4b21ea4192c025159dd60b1175c084c0383ed0
CVP: If we have a PHI with an incoming select, try to skip the select.

This is a common pattern with dyn_cast and similar constructs, when the
PHI no longer depends on the select it can often be turned into a simpler
construct or even get hoisted out of the loop.

PR15340.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175995 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
test/Transforms/CorrelatedValuePropagation/basic.ll