aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-07-20 17:36:29 -0700
committerAndrew Pinski <apinski@marvell.com>2023-07-21 00:33:39 -0700
commit6d449531a60b56ed0f4aeb640aa9e46e4ec35208 (patch)
tree0fd483bea3519274c60f081359221a2899eaa399 /gcc/tree-ssa-phiopt.cc
parent9a8782e63790842d1bfa03e12eecf73c4aaeb1f8 (diff)
downloadgcc-6d449531a60b56ed0f4aeb640aa9e46e4ec35208.zip
gcc-6d449531a60b56ed0f4aeb640aa9e46e4ec35208.tar.gz
gcc-6d449531a60b56ed0f4aeb640aa9e46e4ec35208.tar.bz2
MATCH: Add Max<Max<a,b>,a> -> Max<a,b> simplifcation
This adds a simple match pattern to simplify `max<max<a,b>,a>` to `max<a,b>`. Reassociation handles this already (r0-77700-ge969dbde29bfd396259357) but seems like we should be able to handle this even before reassociation. This fixes part of PR tree-optimization/80574 but more work is needed fix it the rest of the way. The original testcase there is fixed but the RTL level is what fixes it the rest of the way. OK? Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * match.pd (minmax<minmax<a,b>,a>->minmax<a,b>): New transformation. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/reassoc-12.c: Disable all of the passes that enables match-and-simplify. * gcc.dg/tree-ssa/minmax-23.c: New test.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions