Replace conditional_replacement with match and simplify
authorAndrew Pinski <apinski@marvell.com>
Tue, 1 Jun 2021 01:05:09 +0000 (01:05 +0000)
committerAndrew Pinski <apinski@marvell.com>
Tue, 1 Jun 2021 18:50:32 +0000 (18:50 +0000)
commit9f55df63154a39d67ef5b24def7044bf87300831
tree112db297766b38cf773e61304c08db65f3927116
parentea418485c700494c3efdc282854c5f5a08702416
Replace conditional_replacement with match and simplify

This is the first of series of patches to simplify phi-opt
to use match and simplify in many cases.  This simplification
will more things to optimize.

This is what Richard requested in
https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571197.html
and I think it is the right thing to do too.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

PR tree-optimization/25290
* tree-ssa-phiopt.c (match_simplify_replacement):
New function.
(tree_ssa_phiopt_worker): Use match_simplify_replacement.
(two_value_replacement): Change the comment about
conditional_replacement.
(conditional_replacement): Delete.
gcc/tree-ssa-phiopt.c