From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9CF93391B084; Thu, 8 Dec 2022 17:30:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CF93391B084 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670520643; bh=lGmEM1CWExdCi7cbVzz72IeaGUDPXOI9a0x9iSr9Jiw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=S7ubWZlUppglgbrsf0bKKmrqRP1yh2I+5HDonDHvSyaSaZuXO11te+cXYKJ5cXY0l pGASSi1Y2bjiMm/GdCjKyRKuYH1kw13rsgOn6L10EGiI+Z4AYJnlK/dp2p4x8+ZPFk 82oX+3paNRRULajnl3tN/fwk2vaU/tFMhQCL/mbw= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106912] [13 Regression] ICE in vect_transform_loops, at tree-vectorizer.cc:1032 since r13-1575-gcf3a120084e94614 Date: Thu, 08 Dec 2022 17:30:26 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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=3D106912 --- Comment #6 from Jakub Jelinek --- Sure, the FUNCTION_TYPE can be shared, so shouldn't be overwritten in place, but can be copied with TREE_READONLY cleared on the copy. So, if we for whatever reason need to clear const flag on some functions, a= fter clearing TREE_READONLY on the node->decl we'd also need to update the TREE_= TYPE to a version without TREE_READONLY set (so that say if new calls are created they don't get wrong fntype) and then walk all call edges to that function, updating gimple_call_fntype to the updated type if it was equal to the old TREE_TYPE, or to a copy with TREE_READONLY cleared if it has TREE_READONLY = set on the FUNCTION/METHOD_TYPE).=