From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 780973858433; Mon, 20 Mar 2023 20:20:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 780973858433 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679343640; bh=QTLDryc1BObXFMe2NIQKwExbSKGdDS57WBrDIJboreg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vF/hwFiTKHRUNnVKIwCjMraILcP/eH/EeoG/eRNDJzsb/f9AM7+ydvbydcV4rsmnw U9pmCHIW6REqsiJkRCSfnyXKAWXalTWMKVb7WKHrV0KVH++2xVs5ZFhRs5BC+hBHJx GhpEnLb/2+sk2d0GFYf9+wwxwtSALDnAkLiy1n40= From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109192] [13 Regression] timeout with -O3 since r13-5579 Date: Mon, 20 Mar 2023 20:20:39 +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: 13.0 X-Bugzilla-Keywords: compile-time-hog, needs-reduction 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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=3D109192 --- Comment #7 from Andrew Macleod --- Created attachment 54716 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54716&action=3Dedit proposed patch This is due to the latter part of the specified patch. We normally termina= te outgoing range calculations once the LHS has reverted to VARYING as we won't learn anything new. The original patch modified this such that if there was a relation present,= we continued calculating as the relation may provide new information, as per t= he original PR. The problem exposed in this PR is that the presence of a relation doesn't m= ean that relation can actually affect the range. This PR shows many relations, none of which are relevant, and with the quadratic nature of the path query= , it makes things quite bad. The attached patch is in testing. It adds a check to determine if the rela= tion can affect the outgoing range or not by checking if the operands are used in the calculation or not. If they are not in the definition chain, they can = have no impact, and we stop the attempt.=