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/111431] a & (a == 0) is not optimized to 0 Date: Mon, 18 Sep 2023 16:13:42 +0000 [thread overview] Message-ID: <bug-111431-4-9rywQEMv6Q@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111431-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111431 --- Comment #7 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:0fb828af75732d39c644fd145c29d41ca14b8cb1 commit r14-4105-g0fb828af75732d39c644fd145c29d41ca14b8cb1 Author: Andrew Pinski <apinski@marvell.com> Date: Sat Sep 16 03:27:26 2023 +0000 MATCH: Add simplifications of `(a == CST) & a` `(a == CST) & a` can be either simplified to simplying `a == CST` or 0 depending on the first bit of the CST. This is an extension of the already pattern of `X & !X` and allows us to remove the 2 xfails on gcc.dg/binop-notand1a.c and gcc.dg/binop-notand4a.c. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/111431 gcc/ChangeLog: * match.pd (`(a == CST) & a`): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/binop-notand1a.c: Remove xfail. * gcc.dg/binop-notand4a.c: Likewise. * gcc.c-torture/execute/pr111431-1.c: New test. * gcc.dg/binop-andeq1.c: New test. * gcc.dg/binop-andeq2.c: New test. * gcc.dg/binop-notand7.c: New test. * gcc.dg/binop-notand7a.c: New test.
next prev parent reply other threads:[~2023-09-18 16:13 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-09-16 2:41 [Bug tree-optimization/111431] New: " pinskia at gcc dot gnu.org 2023-09-16 2:42 ` [Bug tree-optimization/111431] " pinskia at gcc dot gnu.org 2023-09-16 2:53 ` pinskia at gcc dot gnu.org 2023-09-16 3:27 ` pinskia at gcc dot gnu.org 2023-09-16 3:33 ` pinskia at gcc dot gnu.org 2023-09-16 3:39 ` pinskia at gcc dot gnu.org 2023-09-16 16:00 ` pinskia at gcc dot gnu.org 2023-09-18 16:13 ` cvs-commit at gcc dot gnu.org [this message] 2023-09-18 16:17 ` 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-111431-4-9rywQEMv6Q@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).