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 middle-end/100798] a?~t:t and (-(!!a))^t don't produce the same assembly code Date: Wed, 09 Aug 2023 19:22:08 +0000 [thread overview] Message-ID: <bug-100798-4-HTatPMH6pn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100798-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100798 --- Comment #4 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:7fb65f102851248bafa0815401d8bdcea6d7626c commit r14-3110-g7fb65f102851248bafa0815401d8bdcea6d7626c Author: Andrew Pinski <apinski@marvell.com> Date: Mon Aug 7 10:47:09 2023 -0700 MATCH: [PR110937/PR100798] (a ? ~b : b) should be optimized to b ^ -(a) This adds a simple match pattern for this case. I noticed it a couple of different places. One while I was looking at code generation of a parser and also while I was looking at locations where bitwise_inverted_equal_p should be used more. Committed as approved after bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/110937 PR tree-optimization/100798 gcc/ChangeLog: * match.pd (`a ? ~b : b`): Handle this case. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bool-14.c: New test. * gcc.dg/tree-ssa/bool-15.c: New test. * gcc.dg/tree-ssa/phi-opt-33.c: New test. * gcc.dg/tree-ssa/20030709-2.c: Update testcase so `a ? -1 : 0` is not used to hit the match pattern.
next prev parent reply other threads:[~2023-08-09 19:22 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-27 10:39 [Bug middle-end/100798] New: " pinskia at gcc dot gnu.org 2023-05-20 2:25 ` [Bug middle-end/100798] " pinskia at gcc dot gnu.org 2023-08-07 19:04 ` pinskia at gcc dot gnu.org 2023-08-08 0:55 ` pinskia at gcc dot gnu.org 2023-08-09 19:22 ` cvs-commit at gcc dot gnu.org [this message] 2023-08-09 19:27 ` 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-100798-4-HTatPMH6pn@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).