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)
commitee40b9a2d4f5d340baea3f02e5d7f51caaa6b1ec
tree06146827a61b9a081126d29fb70f2ac9ba5c5f8c
parentb867fea5e631ba022fcd8047ba845e5a56a2ff98
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.

llvm-svn: 175995
llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
llvm/test/Transforms/CorrelatedValuePropagation/basic.ll