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/105983] Failure to optimize (b != 0) && (a >= b) as well as the same pattern with binary and Date: Thu, 16 Jun 2022 12:37:48 +0000 [thread overview] Message-ID: <bug-105983-4-BcbFDmmSLc@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105983-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105983 --- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:9642d07c35f14b9917cd115e8a9f0210fbcdcf4f commit r13-1134-g9642d07c35f14b9917cd115e8a9f0210fbcdcf4f Author: Jakub Jelinek <jakub@redhat.com> Date: Thu Jun 16 14:37:06 2022 +0200 match.pd: Improve y == MIN || x < y optimization [PR105983] On the following testcase, we only optimize bar where this optimization is performed at GENERIC folding time, but on GIMPLE it doesn't trigger anymore, as we actually don't see (bit_and (ne @1 min_value) (ge @0 @1)) but (bit_and (ne @1 min_value) (le @1 @0)) genmatch handles :c modifier not just on commutative operations, but also comparisons and in that case it means it swaps the comparison. 2022-06-16 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/105983 * match.pd (y == XXX_MIN || x < y -> x <= y - 1, y != XXX_MIN && x >= y -> x > y - 1): Use :cs instead of :s on non-equality comparisons. * gcc.dg/tree-ssa/pr105983.c: New test.
next prev parent reply other threads:[~2022-06-16 12:37 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-14 21:37 [Bug tree-optimization/105983] New: " gabravier at gmail dot com 2022-06-14 21:39 ` [Bug tree-optimization/105983] " pinskia at gcc dot gnu.org 2022-06-14 21:41 ` pinskia at gcc dot gnu.org 2022-06-14 21:45 ` pinskia at gcc dot gnu.org 2022-06-15 12:26 ` jakub at gcc dot gnu.org 2022-06-15 13:32 ` jakub at gcc dot gnu.org 2022-06-15 14:13 ` rearnsha at gcc dot gnu.org 2022-06-15 14:20 ` rearnsha at gcc dot gnu.org 2022-06-15 14:50 ` jakub at gcc dot gnu.org 2022-06-16 12:37 ` cvs-commit at gcc dot gnu.org [this message] 2022-06-16 12:39 ` jakub 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-105983-4-BcbFDmmSLc@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).