public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/80574] GCC fail to optimize nested ternary Date: Fri, 21 Jul 2023 07:34:00 +0000 [thread overview] Message-ID: <bug-80574-4-i7S38vabGK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-80574-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80574 --- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>: https://gcc.gnu.org/g:6d449531a60b56ed0f4aeb640aa9e46e4ec35208 commit r14-2698-g6d449531a60b56ed0f4aeb640aa9e46e4ec35208 Author: Andrew Pinski <apinski@marvell.com> Date: Thu Jul 20 17:36:29 2023 -0700 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.
next prev parent reply other threads:[~2023-07-21 7:34 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-80574-4@http.gcc.gnu.org/bugzilla/> 2021-07-20 3:08 ` pinskia at gcc dot gnu.org 2021-07-20 3:08 ` pinskia at gcc dot gnu.org 2023-05-02 4:29 ` pinskia at gcc dot gnu.org 2023-07-20 20:49 ` pinskia at gcc dot gnu.org 2023-07-21 4:09 ` pinskia at gcc dot gnu.org 2023-07-21 7:34 ` cvs-commit at gcc dot gnu.org [this message] 2023-07-21 7:43 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-80574-4-i7S38vabGK@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).