From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6B09E3858D39; Thu, 10 Nov 2022 21:31:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B09E3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668115914; bh=pOheVCpCYTo1JO9BphqasXV1UtCX9Z0rSgBtN1FsX98=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lBUYyZ7AbPuPESB0KKQjtoUTa1DNqqlTSsXNM8wePm3u3CVS0bs5mhsseTCHhzbNE /5vUFSPiTq86+R57qiODH2X4TeNyupZqr4uPYlvrNU1HnZw88+ZtWMi6w7AtgtqXrD xzYi5q+JCwzDN/vgEipSAf6a428fmQh3cCS/e6B0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107622] Missing optimization of switch-statement Date: Thu, 10 Nov 2022 21:31:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107622 --- Comment #2 from Andrew Pinski --- There is one part which GCC could optimize better that is the store. There might be another bug about that too. Note as I mentioned __builtin_unreachable is needed if truely the value com= ing inside g is outside of [0,3] range.=