From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B1903858D38; Mon, 11 Mar 2024 10:02:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B1903858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710151326; bh=uRy4KFl4v5Fgo4y7qmf9YV4UJ/GcKUvMr3lV/nSxItg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ef6W95ETwvj7o2SI1p3o6HZD/pAEirb7kRTSz57fe3orW0F589irHjcw9rqR17qQ+ WTGZR7AXgOELV10QJQnlOCBrUdD4cGrEKHa/GpbpCussQChI8CeNN8/C8JWUnwFOnj 7Yb4XqKeTNbskD9aVdEV0O2TOc63tmzpdNj4ybIM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114278] ICE: in extract_bit_field_1, at expmed.cc:1838 with memmove, _BitInt() and -O2 -fno-tree-dce -fno-tree-dse -fno-tree-ccp -m32 Date: Mon, 11 Mar 2024 10:02:03 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub 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=3D114278 --- Comment #3 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:dbe5ccda4dbbd064c703cd3ab2a58ea40f08dd1a commit r14-9424-gdbe5ccda4dbbd064c703cd3ab2a58ea40f08dd1a Author: Jakub Jelinek Date: Mon Mar 11 11:00:54 2024 +0100 bitint: Avoid rewriting large/huge _BitInt vars into SSA after bitint lowering [PR114278] The following testcase ICEs, because update-address-taken subpass of fre5 rewrites _BitInt(128) b; vector(16) unsigned char _3; [local count: 1073741824]: _3 =3D MEM [(char * {ref-all})p_2(D)]; MEM [(char * {ref-all})&b] =3D _3; b =3D{v} {CLOBBER(eos)}; to _BitInt(128) b; vector(16) unsigned char _3; [local count: 1073741824]: _3 =3D MEM [(char * {ref-all})p_2(D)]; b_5 =3D VIEW_CONVERT_EXPR<_BitInt(128)>(_3); but we can't have large/huge _BitInt vars in SSA form after the bitint lowering except for function arguments loaded from memory, as expansion isn't able to deal with those, it relies on bitint lowering to lower those operations. The following patch fixes that by setting DECL_NOT_GIMPLE_REG_P for large/huge _BitInt vars after bitint lowering, such that we don't rewrite them into SSA form. 2024-03-11 Jakub Jelinek PR tree-optimization/114278 * tree-ssa.cc (maybe_optimize_var): If large/huge _BitInt vars = are no longer addressable, set DECL_NOT_GIMPLE_REG_P on them. * gcc.dg/bitint-99.c: New test.=