From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 85174385781A; Mon, 28 Nov 2022 18:21:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85174385781A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669659692; bh=Clwy+QjekhcQUzQmrdQ9FsSNKXeNhpGs8BrbzCgsOhg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=r84tJO2GbBbR9BuNo6/JaYV9EveTqQL5PtAss51qVl7VV5Vf+wVzwn+vsF0zpfSW3 JIr5wFqbOzSdZdHvuMqJi+DsvwsNyYraqSQHyQTIELQ3xZ+Mpn6c7gT92J1Jzl4AVX IH70UjNGDuexULdgCLPLK+fj0JSA/Up7c5wu48NU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/105126] [10/11/12/13 Regression] Optimization regression gcc inserts not needed movsx when using switch statement Date: Mon, 28 Nov 2022 18:21:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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=3D105126 --- Comment #5 from Andrew Pinski --- Note for aarch64, is_bin_1 produces better code on the trunk than is_bin_0. There is an extra zero extent for is_bin_0 there. So I suspect this is we get a promotion/demotion pass, it will definitely n= eed to check some target specific hooks/macros to get the best code generation. x86_64 might be one of the few targets (left) that demotion makes a differe= nce while most other targets want promotions really.=