diff options
author | Andrew Pinski <apinski@marvell.com> | 2023-04-28 16:21:50 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2023-05-04 04:25:38 -0700 |
commit | d256dc28f0eadd0435df3483ddb2b249d5fec75f (patch) | |
tree | c3ff9da08900c0f7c46ba9078e9c535c9a74bca3 /libcpp | |
parent | 78b0eea7802698f51377f77aa98453556854a328 (diff) | |
download | gcc-d256dc28f0eadd0435df3483ddb2b249d5fec75f.zip gcc-d256dc28f0eadd0435df3483ddb2b249d5fec75f.tar.gz gcc-d256dc28f0eadd0435df3483ddb2b249d5fec75f.tar.bz2 |
PHIOPT: Improve replace_phi_edge_with_variable for diamond shapped bb
While looking at differences between what minmax_replacement
and match_simplify_replacement does. I noticed that they sometimes
chose different edges to remove. I decided we should be able to do
better and be able to remove both empty basic blocks in the
case of match_simplify_replacement as that moves the statements.
This also updates the testcases as now match_simplify_replacement
will remove the unused MIN/MAX_EXPR and they were checking for
those.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
* tree-ssa-phiopt.cc (replace_phi_edge_with_variable): Handle
diamond form bb with forwarder only empty blocks better.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/minmax-15.c: Update test.
* gcc.dg/tree-ssa/minmax-16.c: Update test.
* gcc.dg/tree-ssa/minmax-3.c: Update test.
* gcc.dg/tree-ssa/minmax-4.c: Update test.
* gcc.dg/tree-ssa/minmax-5.c: Update test.
* gcc.dg/tree-ssa/minmax-8.c: Update test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions