]> git.ipfire.org Git - thirdparty/gcc.git/commit
PHIOPT: Move check on diamond bb to tree_ssa_phiopt_worker from minmax_replacement
authorAndrew Pinski <apinski@marvell.com>
Thu, 20 Apr 2023 16:23:25 +0000 (09:23 -0700)
committerAndrew Pinski <apinski@marvell.com>
Mon, 24 Apr 2023 15:45:10 +0000 (08:45 -0700)
commit2f58dd71d1b8e23f28a43360742519e92ee0c8d5
tree21e3187824e576a9f9bf9157461c2f2588a4c1ff
parentb9ee7c6bfdbfcc722f3e4c8bd8378cccd4311740
PHIOPT: Move check on diamond bb to tree_ssa_phiopt_worker from minmax_replacement

This moves the check to make sure on the diamond shaped form bbs that
the the two middle bbs are only for that diamond shaped form earlier
in the shared code.
Also remove the redundant check for single_succ_p since that was already
done before hand.
The next patch will simplify the code even further and remove redundant
checks.

PR tree-optimization/109604

gcc/ChangeLog:

* tree-ssa-phiopt.cc (tree_ssa_phiopt_worker): Move the
diamond form check from ...
(minmax_replacement): Here.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr109604-1.c: New test.
* gcc.c-torture/compile/pr109604-2.c: New test.
gcc/testsuite/gcc.c-torture/compile/pr109604-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/pr109604-2.c [new file with mode: 0644]
gcc/tree-ssa-phiopt.cc