From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DC7E23858C27; Thu, 10 Nov 2022 13:13:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC7E23858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668085986; bh=OuOJ53THxUfC08P0MEhyHimmPlkex7FfCJBxyIxU1Gc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XxSsL8bYHSYCBEmhaAoA64qx3cF5Ku5TGA1D6IFVz2mnFHJ+Y36xS4xPagwc2UDBm kI7j1BLVSOQvHyFvLbyersT65qa7WxKcQtau2WziRopSEHq2K3GJ24BX2IWB98UWhx OWlBr3djZl7cM8QHmNhgl3y4oAIZmuUePK83Ht4s= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/84646] Missed optimisation for hoisting conditions outside nested loops Date: Thu, 10 Nov 2022 13:13:06 +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: 8.0.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D84646 --- Comment #8 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:203b127fccc9abe5373c9e3cc03a476c35b1f594 commit r13-3877-g203b127fccc9abe5373c9e3cc03a476c35b1f594 Author: Richard Biener Date: Thu Nov 10 14:08:35 2022 +0100 Restore CCP copy propagation The following restores copy propagation in CCP for the case the lattice was constant before trying to transition to a copy. At some point we changed to use the meet operator to handle integer constant -> integer constant transitions but that screws up the const -> copy lattice transition. PR tree-optimization/84646 * tree-ssa-ccp.cc (set_lattice_value): Make sure we allow a const -> copy transition and avoid using meet in that case. * gcc.dg/tree-ssa/ssa-ccp-42.c: New testcase.=