]> gcc.gnu.org Git - gcc.git/commit
PHIOPT: Add support for diamond shaped bb to match_simplify_replacement
authorAndrew Pinski <apinski@marvell.com>
Fri, 21 Apr 2023 21:45:56 +0000 (14:45 -0700)
committerAndrew Pinski <apinski@marvell.com>
Mon, 24 Apr 2023 15:50:11 +0000 (08:50 -0700)
commitf1f5cbaa3f716fcb472dee52b8a159ccd5576828
tree21e1115ffd0fbd0a79624c0f92ca78350c31ddc7
parenta2339e0fe9dbefdeca49a8105c7a547231c02d34
PHIOPT: Add support for diamond shaped bb to match_simplify_replacement

This adds diamond shaped form of basic blocks to match_simplify_replacement.
This is the patch is the start of removing/moving all
of what minmax_replacement does to match.pd to reduce the code duplication.

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

Note phi-opt-{23,24}.c testcase had an incorrect xfail as there should
have been 2 if still because f4/f5 would not be transformed as -ABS is
not allowable during early phi-opt.

gcc/ChangeLog:

* tree-ssa-phiopt.cc (match_simplify_replacement): Add new arguments
and support diamond shaped basic block form.
(tree_ssa_phiopt_worker): Update call to match_simplify_replacement

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/phi-opt-23.c: Update testcase.
* gcc.dg/tree-ssa/phi-opt-24.c: Likewise.
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-23.c
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-24.c
gcc/tree-ssa-phiopt.cc
This page took 0.075049 seconds and 6 git commands to generate.