From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C89ED3858291; Fri, 3 Mar 2023 11:07:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C89ED3858291 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677841620; bh=3CrSJBPcj4OjFMHIUb6MkfA435//ui+5KhFpzFMOz2w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=h4/VQXESUX7R/WEQX0xqC+9Gn2o41gN14JpeP9UER11ZmaDwblnH3Yw44nvAByTXw ShKCVRkxMK9zVcMz6/BMZ0AajGY0DyGkMBfYB2svc6T3shHNyRYheq5KuMUKPbQBDQ 0UjII6i5N2/hiKdZKA5Sa+g64xrFeO9TanjRfrSQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109002] [13 Regression] -O1 -ftree-pre -ftree-partial-pre results in stall value Date: Fri, 03 Mar 2023 11:07:00 +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: needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109002 --- Comment #6 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:0132acc03cada2c3b47c48a205e821563153fc80 commit r13-6443-g0132acc03cada2c3b47c48a205e821563153fc80 Author: Richard Biener Date: Fri Mar 3 10:41:29 2023 +0100 tree-optimization/109002 - partial PRE miscompilation Partial PRE ends up miscompiling the testcase in PR109002, likely involving a corner case when inifinite loops are involved. The following avoids the miscompilation by addressing a long-standing oddity that manifests in odd partial partial redundancies eliminated that are full redundancies. The oddity is that while we properly PHI translate the PA_IN set from the successors when computing PA_OUT but we fail to do the same for ANTIC_IN which is supposed to be unioned. That results in expressions with wrong virtual operands being placed in the PA_OUT/IN sets and the pruning machinery to go wrong because it assumes the expressions in the sets have virtual operands that are valid in the respective blocks. PR tree-optimization/109002 * tree-ssa-pre.cc (compute_partial_antic_aux): Properly PHI-translate ANTIC_IN. * gcc.dg/torture/pr109002.c: New testcase.=