public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114331] Missed optimization: indicate knownbits from dominating condition switch(trunc(a)) Date: Thu, 14 Mar 2024 18:41:17 +0000 [thread overview] Message-ID: <bug-114331-4-yZJtxWBlBA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114331-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114331 --- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Yeah. So the cases where we should do it is when we are reversing a narrowing cast, or also something for the other PRs Andrew mentioned, like when reversing BIT_AND_EXPR (but maybe also BIT_IOR_EXPR/BIT_XOR_EXPR, haven't thought that out; maybe only if BIT_AND_EXPR has constant second argument?). For that if ((i & 7) == 6) in there aka _1 = i_2(D) & 7; if (_1 == 6) ... we get [6, 6] range on that edge (with irange_bitmask again implicit), but if we want to ask what the range of i_2(D) is we can ask for irange_bitmask to be computed (MASK 0x0 VALUE 0x6) and for i_2(D) reverse the mask, i.e. MASK 0xfffffff8 VALUE 0x6;
next prev parent reply other threads:[~2024-03-14 18:41 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-14 5:50 [Bug tree-optimization/114331] New: " xxs_chy at outlook dot com 2024-03-14 8:36 ` [Bug tree-optimization/114331] " rguenth at gcc dot gnu.org 2024-03-14 8:44 ` jakub at gcc dot gnu.org 2024-03-14 12:45 ` amacleod at redhat dot com 2024-03-14 13:21 ` jakub at gcc dot gnu.org 2024-03-14 16:33 ` amacleod at redhat dot com 2024-03-14 16:57 ` aldyh at gcc dot gnu.org 2024-03-14 17:08 ` jakub at gcc dot gnu.org 2024-03-14 17:28 ` amacleod at redhat dot com 2024-03-14 17:39 ` pinskia at gcc dot gnu.org 2024-03-14 17:58 ` jakub at gcc dot gnu.org 2024-03-14 18:29 ` amacleod at redhat dot com 2024-03-14 18:41 ` jakub at gcc dot gnu.org [this message] 2024-03-15 7:51 ` aldyh at gcc dot gnu.org 2024-03-15 8:01 ` jakub at gcc dot gnu.org 2024-03-15 8:05 ` 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-114331-4-yZJtxWBlBA@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).