From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 19288385AFA8; Tue, 18 Jul 2023 15:38:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19288385AFA8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689694734; bh=5v+/B2ywUaXHNc1naigpCbz6p4bIJibqcHeW71WkB2M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XonmwoUlE5VaEEs7KDgp1NwvKBs5mVQeTrmcDiS/rO2JT2MD9vTA8pgx7XVoDlmQU iItBKkgNCbjQPTjzZJpZ8HueyasgGFBgkQ0ktiHsv0t4RwTh1zCxI+sM56hYykvQ0O JDmzyGuUoQsdWljVzzE7LKGe2tRQBiTmgIhccsW0= From: "roger at nextmovesoftware dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/110701] [14 Regression] Wrong code at -O1/2/3/s on x86_64-linux-gnu Date: Tue, 18 Jul 2023 15:38:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: roger at nextmovesoftware dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D110701 Roger Sayle changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roger at nextmovesoftware = dot com --- Comment #5 from Roger Sayle --- nonzero_bits ((reg:DI 92),SImode) is returning 340, so combine (or more specifically simplify_and_const_int_1) believes that the AND (ZERO_EXTEND) isn't unnecessary. So it's the same nonzero_bits information that allows u= s to turn the XOR into IOR (in insn 16) that's incorrectly telling us the AND 3= 40 (or AND 343, or ZERO_EXTEND) is unnecessary (in insn 17).=