From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A9037385840D; Wed, 24 Apr 2024 13:04:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9037385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713963878; bh=0v+A65pcHRB5SvLVIr2Z4jPU7OumOuYR0WR+uIZbXR4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XjDUW8bBUQWpwRxmj/Dr/Z7LbIzcMrv55UmZ1zblQ6BCKhL3vpbWhhVMLMGBJ/bKB BiiRUcVH6XvmpQI5f9fy04pdQWuGKUQ+rB/13I/nYNRqf4mDaTzNnGku5zLwEaTO/I fKWf2Wsyi5fMYKP0O/gq2DpW7I/bFcB3UbaVavEE= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114792] [14 Regression] ICE on valid code at -O1 with "-fno-tree-ccp -fno-tree-copy-prop" on x86_64-linux-gnu: in get_loop_body, at cfgloop.cc:903 Date: Wed, 24 Apr 2024 13:04:37 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D114792 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener --- The issue is that unloop_loops doesn't work when to unloop loops are nested= .=20 The unroller takes great care of working on a single loop level at a time, cleaning up the CFG and fixing loops inbetween but we fail to ensure this h= ere. unlooping in CH is somewhat a wrong tool for the wrong task as it doesn't adhere to constraints present. There's the possibility this can be salvage= d by making unloop_loops more robust, in particular computing loop bodies (Which= is fragile) up-front. But it would be much nicer if unlooping would simply add __builtin_unreacha= ble () as the first stmt into the latch and leave the rest to CFG cleanup.=