]> gcc.gnu.org Git - gcc.git/commit
MATCH: Add patterns from phiopt's minmax_replacement
authorAndrew Pinski <apinski@marvell.com>
Sat, 1 Apr 2023 05:13:31 +0000 (05:13 +0000)
committerAndrew Pinski <apinski@marvell.com>
Fri, 28 Apr 2023 14:25:40 +0000 (07:25 -0700)
commitc43819a9b4cdaa7359e55f942f20d2ce6fd49da6
tree5469098c409b476001bde1873f8687d21f22ab3a
parentb9b30dbaabc8076d9265cf685f45d3b0072a09df
MATCH: Add patterns from phiopt's minmax_replacement

This adds a few patterns from phiopt's minmax_replacement
for (A CMP B) ? MIN/MAX<A, C> : MIN/MAX <B, C> .
It is progress to remove minmax_replacement from phiopt.
There are still some more cases dealing with constants on the
edges (0/INT_MAX) to handle in match.

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

gcc/ChangeLog:

* match.pd: Add patterns for
"(A CMP B) ? MIN/MAX<A, C> : MIN/MAX <B, C>".

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/minmax-16.c: Update testcase slightly.
* gcc.dg/tree-ssa/split-path-1.c: Also disable tree-loop-if-convert
as that now does the combining.
gcc/match.pd
gcc/testsuite/gcc.dg/tree-ssa/minmax-16.c
gcc/testsuite/gcc.dg/tree-ssa/split-path-1.c
This page took 0.06589 seconds and 5 git commands to generate.