From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 652413858036; Thu, 4 Jan 2024 18:48:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 652413858036 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704394112; bh=TNGIZXXXE36Wd3F0VJ1B2wbygZydy8lS6XqhxqHWmYU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Iz77p4AKa1ajniJc8sLugFBOqyMbsiBfVXTmUJustKQmUi3eOcMo3P9erIdmzmjgT kIFoPXmofYeZp5UvMOgHx5WYrliUIlAgssBAeaFq6KSMwNQipqv1e7V4Dd3RDq5jqX u10fERuyVnU8TnQyEaAuLdbSkqDx0h8WgyQQn2ls= From: "tnfchris at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113237] [14 Regression] ICE verify_ssa failed when building 500.perlbench_r since r14-6822-g01f4251b8775c8 Date: Thu, 04 Jan 2024 18:48:31 +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: tnfchris at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: tnfchris at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: priority cf_reconfirmed_on everconfirmed assigned_to bug_status 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=3D113237 Tamar Christina changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 Last reconfirmed| |2024-01-04 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |tnfchris at gcc dot= gnu.org Status|UNCONFIRMED |ASSIGNED --- Comment #3 from Tamar Christina --- Thanks, Indeed the patch for PR 113137 won't fix this one as it looks like the peel= ing code has gotten confused about which exit is which when adjusting virtual_operands. It looks like it's swapped them, and this happens because non of the loop e= xits are counting one so it just picks a random one. Looks the one it picks is not the latch connected one: perl.c:10:8: note: using as main loop exit: 11 -> 7 [AUX: (nil)] perl.c:10:8: note: =3D=3D=3D get_loop_niters =3D=3D=3D perl.c:10:8: note: Loop has 2 exits. perl.c:10:8: note: Analyzing exit 0... perl.c:10:8: note: Analyzing exit 1... which then incorrectly peels: # iters_46 =3D PHI which should be: # iters_46 =3D PHI I started implemented a fix for this same situation earlier for PR 113178 b= ut didn't finish it because I didn't think we'd get this far with a legit loop. I'll finish that part. Thanks for the testcase!=