From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD0163858C53; Mon, 31 Jul 2023 16:11:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD0163858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690819898; bh=w5s0ivUqJc0My++y5pVEZ1e2cxHfWJQ+k9HnmiTO/Hg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ocfu2DbVUXtmhqAHaG9zSOc4kkFlJhP3eA8todruMS4jE+ABrFATSREGxUsIpGlSn q5jvqCOvGOo/1xvrFIyPbXr2TK15HeLLFgdL5cpdzO1hcwWf++LD0NxXiqg6mgJo9F st/sL1W+4gtQzAEDVyS8TTxWcGRy+kBWlkXmegL4= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110582] [14 Regression] Wrong code at -O2/3 on x86_64-linux-gnu Date: Mon, 31 Jul 2023 16:11:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution 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=3D110582 Andrew Macleod changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Andrew Macleod --- There was a bug in the implementation of fur_list where it was using the supplied values for *any* encountered operand, not just ssa_names. so when the phi analyzer was trying to find an initial value fro the PHI a_lsm.2_29= it was miscalculating the value of iftmp.1_15 and thought it had an (incorrect) limited range of [-2,2]. # a_lsm.12_29 =3D PHI iftmp.1_15 =3D 3 / a_lsm.12_29;=20 it then though it could fold away the condition. The patch adjusts the operand fetcher to work properly, and then the phi analyzer calcualtes the range for the statement properly, and we can no lon= ger remove the condtion.=