diff options
author | Andrew Pinski <apinski@marvell.com> | 2023-04-19 10:31:20 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2023-04-22 13:22:35 -0700 |
commit | 84325f1c6aa3c52600ff558c4cfd028ec07b076a (patch) | |
tree | 1cbb3c7c4dec86745974cb6eebfe8604540ed835 /gcc/tree-ssa-phiopt.cc | |
parent | 911db256258004b2eec9a0ca3fa47f9bcb5c5856 (diff) | |
download | gcc-84325f1c6aa3c52600ff558c4cfd028ec07b076a.zip gcc-84325f1c6aa3c52600ff558c4cfd028ec07b076a.tar.gz gcc-84325f1c6aa3c52600ff558c4cfd028ec07b076a.tar.bz2 |
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.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
-rw-r--r-- | gcc/tree-ssa-phiopt.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index 945507b..8c5c8d8 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -209,8 +209,7 @@ tree_ssa_phiopt_worker (bool do_store_elim, bool do_hoist_loads, bool early_p) hoist_adjacent_loads (bb, bb1, bb2, bb3); continue; } - else if (EDGE_SUCC (bb1, 0)->dest == EDGE_SUCC (bb2, 0)->dest - && !empty_block_p (bb1)) + else if (EDGE_SUCC (bb1, 0)->dest == EDGE_SUCC (bb2, 0)->dest) { diamond_p = true; e2 = EDGE_SUCC (bb2, 0); |