public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109637] unnecessary range check in complete switch on bitfield Date: Wed, 26 Apr 2023 18:52:58 +0000 [thread overview] Message-ID: <bug-109637-4-EESSGiGcpV@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109637-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109637 Andrew Macleod <amacleod at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amacleod at redhat dot com --- Comment #2 from Andrew Macleod <amacleod at redhat dot com> --- I think the bigger questions is why did switch conv change: 1 = s_5(D)->x; switch (_1) <default: <L5> [INV], case 1: <L1> [INV], case 2: <L2> [INV], case 3: <L3> [INV]> <bb 3> : <L1>: goto <bb 6>; [INV] <bb 4> : <L2>: goto <bb 6>; [INV] <bb 5> : <L3>: <bb 6> : # _3 = PHI <0(2), 1(3), 2(4), 3(5)> <L5>: return _3; to <bb 2> : _1 = s_5(D)->x; _6 = (unsigned char) _1; _2 = _6 + 255; if (_2 <= 2) goto <bb 4>; [INV] else goto <bb 3>; [INV] <bb 3> : <L6>: _10 = 0; goto <bb 5>; [100.00%] <bb 4> : <L7>: _8 = (unsigned int) _1; _9 = (int) _1; _7 = _9; <bb 5> : # _3 = PHI <_10(3), _7(4)> <L8>: <L5>: return _3; Why are we adding -1 to [0,3] ? Thats the root of this issue I think? seems strange
next prev parent reply other threads:[~2023-04-26 18:52 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-26 18:17 [Bug middle-end/109637] New: " mattiase at acm dot org 2023-04-26 18:19 ` [Bug middle-end/109637] " pinskia at gcc dot gnu.org 2023-04-26 18:28 ` [Bug tree-optimization/109637] " pinskia at gcc dot gnu.org 2023-04-26 18:52 ` amacleod at redhat dot com [this message] 2023-04-26 19:02 ` amacleod at redhat dot com 2023-04-26 19:05 ` pinskia at gcc dot gnu.org 2023-04-26 19:16 ` amacleod at redhat dot com 2023-08-11 0:17 ` pinskia at gcc dot gnu.org 2023-08-11 0:39 ` 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-109637-4-EESSGiGcpV@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).