From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3F4CD386189C; Wed, 1 Jul 2020 16:35:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F4CD386189C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593621339; bh=4zLIxQo22m3j7RP7hcJRhQRwTvF6iQdJrZHOJXL4nbs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=p5O6NUgevbbnHn/PiZadzpSw0UUZX3hzO5emAx6axuMm0rnS1WJwpvsW/VWDeSVod IZYcPD/WCVNgAi1TmvGj9rwRbVii3frNTJuAFCTpPzHOMwkAUBq7/FWX2WyVYpykto auekhhu4PR2vihWeqXN0fyb7zh9Kkm43EmSbmhI0= From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96015] [10/11 Regression] gcc-10.1.0 miscompiles Python on hppa Date: Wed, 01 Jul 2020 16:35:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com 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: 10.2 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 16:35:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96015 --- Comment #12 from Jeffrey A. Law --- The block in question goes away because it serves no purpose: [local count: 242478389]: _13 =3D *self_11(D); _16 =3D *other_12(D); sign_17 =3D _13 - _16; if (sign_17 =3D=3D 0) goto ; [34.00%] else goto ; [66.00%] [local count: 160035736]: goto ; [100.00%] Note that bb6 just transfers control to bb13 with no other side effects. A= s a result bb5 is equivalent to: [local count: 242478389]: _13 =3D *self_11(D); _16 =3D *other_12(D); sign_17 =3D _13 - _16; if (sign_17 =3D=3D 0) goto ; [34.00%] else goto ; [66.00%] With both arms of the conditional going to the same place and no other uses= of sign_17 the whole block just turns into goto ; I see nothing wrong with what was done by DCE. The problem must be earlier= in the optimizer pipeline.=