From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5A2453857C51; Thu, 18 Nov 2021 16:34:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A2453857C51 From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103254] [12 Regression] Compile time hog in compare_values_warnv since r12-4790-g4b3a325f07acebf4 Date: Thu, 18 Nov 2021 16:34:53 +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: 12.0 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Thu, 18 Nov 2021 16:34:53 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103254 --- Comment #3 from Andrew Macleod --- This is a long sequence, made from the following pattern: _156 =3D _155 & _147; _157 =3D (int) _156; j_158 =3D _157 & j_149; _164 =3D (short int) j_158; _165 =3D _164 & _156; Since GORI doesn't yet cache anything, each name evaluation is a "new" requ= est. to resolve _165 it calculates _164 and _156. Note that _164 is also ultimately defined by _156 (in combination with _j_1= 49). so that means we evaluate _156 twice to get _165. This rapidly triggers the same exponential growth we encountered with PR 100081, so we will need to limit this sort of thing in general until GORI starts caching outgoing values.=