aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-04-28 16:21:50 -0700
committerAndrew Pinski <apinski@marvell.com>2023-05-04 04:25:38 -0700
commitd256dc28f0eadd0435df3483ddb2b249d5fec75f (patch)
treec3ff9da08900c0f7c46ba9078e9c535c9a74bca3 /libcpp
parent78b0eea7802698f51377f77aa98453556854a328 (diff)
downloadgcc-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