public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99919] [10/11/12/13 Regression] bogus -Wmaybe-uninitialized with a _Bool bit-field Date: Thu, 08 Dec 2022 09:25:00 +0000 [thread overview] Message-ID: <bug-99919-4-ISGKkQT77d@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99919-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99919 --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Note the uninit pass has code to deal with this special if (b.i) b.j = 0; ... if (b.j) ... but it's confused by the b.j = 0 store appearing literally compared to the b.j test being done via a (b & 2) test. That's also a missed jump threading opportunity and possibly a missed CSE opportunity. b.j = b$j_10; _3 = VIEW_CONVERT_EXPR<unsigned char>(b); _4 = _3 & 2; here _4 could be CSEd as b$j_10. In fact we do have code for this in CSE but the two pieces that would need to work together, a masked load and partial def support, refuse to work together here. In particular the mask can be used to fend off not relevant non-constants and to narrow the bits we want to fill. Not to say SRA does a bad job on this testcase, it's also premature optimize_bit_field_compare "optimization" here. Maybe it's time to kill off the case of bitfield vs constant compare "optimization".
next prev parent reply other threads:[~2022-12-08 9:25 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-05 20:29 [Bug tree-optimization/99919] New: [9/10/11 " msebor at gcc dot gnu.org 2021-04-05 20:51 ` [Bug tree-optimization/99919] " msebor at gcc dot gnu.org 2021-04-06 8:39 ` rguenth at gcc dot gnu.org 2021-04-08 14:22 ` rguenth at gcc dot gnu.org 2021-06-01 8:20 ` [Bug tree-optimization/99919] [9/10/11/12 " rguenth at gcc dot gnu.org 2021-11-30 11:58 ` aldyh at gcc dot gnu.org 2021-11-30 12:06 ` pinskia at gcc dot gnu.org 2021-11-30 14:22 ` aldyh at gcc dot gnu.org 2022-12-08 9:25 ` rguenth at gcc dot gnu.org [this message] 2022-12-08 10:47 ` [Bug tree-optimization/99919] [10/11/12/13 " rguenth at gcc dot gnu.org 2023-04-26 6:55 ` [Bug tree-optimization/99919] [10/11/12/13/14 " rguenth at gcc dot gnu.org 2023-07-27 9:22 ` [Bug tree-optimization/99919] [11/12/13/14 " rguenth at gcc dot gnu.org 2023-12-15 13:33 ` rguenth at gcc dot gnu.org 2024-05-21 9:10 ` [Bug tree-optimization/99919] [11/12/13/14/15 " 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-99919-4-ISGKkQT77d@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).