From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 084743858290; Mon, 17 Oct 2022 18:56:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 084743858290 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666032981; bh=pnk3Yzw6dSaJIh2VNgCzvXoVrKI6boFSZDIlzavUDfY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FYM6OrcOdy5nxNJEWxYQWtx3cY6ajRcjsPLreqplGzEEQwne++zuaLW8dItMAf4On Oo4EC/gyDeqyjv5ljJondWiXFPs0eDlTnT3jb45eXcuGd1p6OLGINHGb8Dm5Kn3Y2h y/VBi96udKi1iwjMBSri8lGw6RmvrxIzOXFqKsrk= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107293] Wrong code at -Os on x86_64-linux-gnu since r13-2876-g2460f7cdef7ef9c9 Date: Mon, 17 Oct 2022 18:56:11 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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: 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=3D107293 --- Comment #3 from CVS Commits --- The master branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:c9b840db504d15db01f06fe1fec38282dbafee07 commit r13-3341-gc9b840db504d15db01f06fe1fec38282dbafee07 Author: Aldy Hernandez Date: Mon Oct 17 18:56:24 2022 +0200 Make sure exported range for SSA post-dominates the DEF in set_global_ranges_from_unreachable_edges. The problem here is that we're exporting a range for an SSA range that happens on the other side of a __builtin_unreachable, but the SSA does not post-dominate the definition point. This is causing ivcanon to unroll things incorrectly. This was a snafu when converting the code from evrp. PR tree-optimization/107293 gcc/ChangeLog: * tree-ssa-dom.cc (dom_opt_dom_walker::set_global_ranges_from_unreachable_edges): Check that condition post-dominates the definition point. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr107293.c: New test.=