public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/111364] `MAX_EXPR<a, b> <= a` is not optimized to `a >= b` Date: Tue, 12 Sep 2023 00:36:06 +0000 [thread overview] Message-ID: <bug-111364-4-QVTCdVlHfl@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111364-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111364 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- diff --git a/gcc/match.pd b/gcc/match.pd index 51985c1bad4..bf49c167792 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3902,9 +3902,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (maxmin @0 (bit_not @1)))) /* MIN (X, Y) == X -> X <= Y */ -(for minmax (min min max max) - cmp (eq ne eq ne ) - out (le gt ge lt ) +(for minmax (min min min min max max max max) + cmp (eq ne lt ge eq ne gt le ) + out (le gt gt le ge lt lt ge ) (simplify (cmp:c (minmax:c @0 @1) @0) (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0)))
next prev parent reply other threads:[~2023-09-12 0:36 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-10 21:11 [Bug tree-optimization/111364] New: " pinskia at gcc dot gnu.org 2023-09-10 21:11 ` [Bug tree-optimization/111364] " pinskia at gcc dot gnu.org 2023-09-12 0:14 ` pinskia at gcc dot gnu.org 2023-09-12 0:36 ` pinskia at gcc dot gnu.org [this message] 2023-09-12 0:36 ` pinskia at gcc dot gnu.org 2023-09-12 5:36 ` pinskia at gcc dot gnu.org 2023-09-12 15:40 ` pinskia at gcc dot gnu.org 2023-09-13 12:07 ` cvs-commit at gcc dot gnu.org 2023-09-13 12:08 ` 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-111364-4-QVTCdVlHfl@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).