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/95929] Failure to optimize tautological comparisons of comparisons to a single one Date: Thu, 24 Aug 2023 06:52:56 +0000 [thread overview] Message-ID: <bug-95929-4-3ZGGIam2Jw@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95929-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95929 --- 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:ddd64a6ec3b38e18aefb9fcba50c0d9297e5e711 commit r14-3432-gddd64a6ec3b38e18aefb9fcba50c0d9297e5e711 Author: Andrew Pinski <apinski@marvell.com> Date: Tue Aug 22 18:41:56 2023 -0700 MATCH: remove negate for 1bit types For 1bit types, negate is either undefined or don't change the value. In either cases we want to remove them. This patch adds a match pattern to do that. Also converting to a 1bit type we can remove the negate just like we already do for `&1` so this patch adds that too. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Notes on the testcases: This patch is the last part to fix PR 95929; cond-bool-2.c testcase. bit1neg-1.c is a 1bit-field testcase where we could remove the assignment all the way in one case (which happened on the RTL level for some targets but not all). cond-bool-2.c is the reduced testcase of PR 95929. PR tree-optimization/95929 gcc/ChangeLog: * match.pd (convert?(-a)): New pattern for 1bit integer types. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bit1neg-1.c: New test. * gcc.dg/tree-ssa/cond-bool-1.c: New test. * gcc.dg/tree-ssa/cond-bool-2.c: New test.
next prev parent reply other threads:[~2023-08-24 6:52 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-27 3:07 [Bug tree-optimization/95929] New: " gabravier at gmail dot com 2020-06-27 12:42 ` [Bug tree-optimization/95929] " glisse at gcc dot gnu.org 2021-08-15 0:09 ` pinskia at gcc dot gnu.org 2023-06-18 18:28 ` pinskia at gcc dot gnu.org 2023-08-22 16:53 ` pinskia at gcc dot gnu.org 2023-08-22 17:02 ` pinskia at gcc dot gnu.org 2023-08-24 2:39 ` pinskia at gcc dot gnu.org 2023-08-24 6:52 ` cvs-commit at gcc dot gnu.org [this message] 2023-08-24 6:53 ` 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-95929-4-3ZGGIam2Jw@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).