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 middle-end/108847] [10/11/12/13/14 Regression] unnecessary bitwise AND on boolean types and shifting of the "sign" bit Date: Sat, 27 May 2023 06:50:38 +0000 [thread overview] Message-ID: <bug-108847-4-TKJvMiUw4O@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108847-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108847 --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Oh simple way to solve this to convert: t2_7 = (unsigned int) t_4; _1 = t1_6 | t2_7; t_8 = _1 != 0; Into: t3_8 = t1_7 != 0; _1 = t_5 | t3_8; Which is smaller even. (for bit_op (bit_ior bit_and bit_xor) (simplify (ne (bit_op (convert @0) @1) integer_zerop@2) (if (TREE_CODE (TREE_TYPE (@0)) == BOOLEAN_TYPE && types_match (type, @0)) (bit_op @0 (ne @1 @2))))
next prev parent reply other threads:[~2023-05-27 6:50 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-19 13:37 [Bug middle-end/108847] New: unnecessary bitwise AND on boolean types lh_mouse at 126 dot com 2023-02-20 18:43 ` [Bug middle-end/108847] " pinskia at gcc dot gnu.org 2023-05-20 1:14 ` [Bug middle-end/108847] unnecessary bitwise AND on boolean types and shifting of the "sign" bit pinskia at gcc dot gnu.org 2023-05-20 23:31 ` pinskia at gcc dot gnu.org 2023-05-20 23:34 ` [Bug middle-end/108847] [10/11/12/13/14 Regression] " pinskia at gcc dot gnu.org 2023-05-20 23:34 ` pinskia at gcc dot gnu.org 2023-05-20 23:36 ` pinskia at gcc dot gnu.org 2023-05-27 6:50 ` pinskia at gcc dot gnu.org [this message] 2023-05-27 7:02 ` pinskia at gcc dot gnu.org 2023-09-17 1:49 ` [Bug middle-end/108847] [11/12/13/14 " pinskia at gcc dot gnu.org 2024-03-08 15:38 ` law at gcc dot gnu.org 2024-05-07 7:40 ` [Bug middle-end/108847] [11/12/13/14/15 " rguenth 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-108847-4-TKJvMiUw4O@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).