]> gcc.gnu.org Git - gcc.git/commit
MATCH: [PR111346] `X CMP MINMAX` pattern missing :c on CMP
authorAndrew Pinski <apinski@marvell.com>
Sun, 10 Sep 2023 22:59:41 +0000 (15:59 -0700)
committerAndrew Pinski <apinski@marvell.com>
Mon, 11 Sep 2023 02:19:14 +0000 (19:19 -0700)
commit190cf0ce8f4c141ac5b42d53b9ddeba367495333
tree64f50600b3fc6e70f75888e8f65c619e38d86433
parentf197392a16ffb1327f1d12ff8ff05f9295e015cb
MATCH: [PR111346] `X CMP MINMAX` pattern missing :c on CMP

I noticed this while working on other MINMAX optimizations. It was
hard to find a simplified testcase though because it was dependent on
the ssa name versions. Adding the `:c` to cmp allows the pattern to
be match for the case where minmax as the first operand of the comparison
rather than the second.

Committed as obvious after a bootstrap/test on x86_64-linux-gnu.

PR tree-optimization/111346

gcc/ChangeLog:

* match.pd (`X CMP MINMAX`): Add `:c` on the cmp part
of the pattern

gcc/testsuite/ChangeLog:

* gcc.dg/tree-ssa/minmaxcmp-1.c: New test.
gcc/match.pd
gcc/testsuite/gcc.dg/tree-ssa/minmaxcmp-1.c [new file with mode: 0644]
This page took 0.0682 seconds and 5 git commands to generate.