]> git.ipfire.org Git - thirdparty/gcc.git/commit
PHIOPT: Improve minmax diamond detection for phiopt1
authorAndrew Pinski <apinski@marvell.com>
Wed, 19 Apr 2023 17:31:20 +0000 (10:31 -0700)
committerAndrew Pinski <apinski@marvell.com>
Sat, 22 Apr 2023 20:22:35 +0000 (13:22 -0700)
commit84325f1c6aa3c52600ff558c4cfd028ec07b076a
tree1cbb3c7c4dec86745974cb6eebfe8604540ed835
parent911db256258004b2eec9a0ca3fa47f9bcb5c5856
PHIOPT: Improve minmax diamond detection for phiopt1

For diamond bb phi node detection, there is a check
to make sure bb1 is not empty. But in the case where
bb1 is empty except for a predicate, empty_block_p
will still return true but the minmax code handles
that case already so there is no reason to check
if the basic block is empty.

This patch removes that check and removes some
xfails.

OK? Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-ssa-phiopt.cc (tree_ssa_phiopt_worker):
Remove check on empty_block_p.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/phi-opt-5.c: Remvoe some xfail.
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-5.c
gcc/tree-ssa-phiopt.cc