From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 032F4384D15B; Tue, 6 Sep 2022 12:56:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 032F4384D15B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662468964; bh=WNgw9Ny2chbVyNppuoD/GUJYiexNaS6lUdDbc2wDwE0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZnXXCLokPSoZGbfXagYGweDvpmGTfol4We2NG+HxJAoDda/U0rqKLIcfiQZJJFemy ka6bxze2bBG76CfeZu7N+h0rQqAt77UasymTtlGITRHU9fTWL+kV+v+IjM5aVC282w 3KxUIjtFfQnfcmpwVN1Gwfp1WYA4eRJl0GxTcBfE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106754] compute_control_dep_chain over-estimates domain Date: Tue, 06 Sep 2022 12:56:02 +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: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106754 --- Comment #1 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:0a4a2667dc115ca73b552fcabf8570620dfbe55f commit r13-2500-g0a4a2667dc115ca73b552fcabf8570620dfbe55f Author: Richard Biener Date: Tue Sep 6 13:46:00 2022 +0200 tree-optimization/106754 - fix compute_control_dep_chain defect The following handles the situation of a loop exit along the control path to the PHI def or from there to the use in a different way, aoviding premature abort of the walks as noticed in the two cases where the exit is outermost (gcc.dg/uninit-pred-11.c) or wrapped in a condition that is on the path (gcc.dg/uninit-pred-12.c). Instead of handling such exits during recursion we now pick them up in the parent when walking post-dominators. That requires an additional post-dominator walk at the outermost level which is facilitated by splitting out the walk to a helper function and the existing wrapper added earlier. The patch also removes the bogus early exit from uninit_analysis::init_use_preds, fixing a simplified version of the PR106155 testcase. PR tree-optimization/106754 * gimple-predicate-analysis.cc (compute_control_dep_chain_pdom): New function, split out from compute_control_dep_chain. Handle loop-exit like conditions here by pushing to the control vector. (compute_control_dep_chain): Adjust and streamline dumping. In the wrapper perform a post-dominator walk as well. (uninit_analysis::init_use_preds): Remove premature early exit. * gcc.dg/uninit-pred-12.c: New testcase. * gcc.dg/uninit-pr106155-1.c: Likewise.=