From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE36D3858D1E; Wed, 20 Mar 2024 09:55:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE36D3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710928553; bh=Fef703ve2x5jwFFoCIKK+4vGUuqgH5nWgvcA+xY+omg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Al/7yrFbtvvWUYGked8p4tNmK7wSsurpTFA7LxF37jdC6sComxYSs1uBAtDsQ0U51 qiRHCxowdGl9amRCgq5GIvNkdPUK1gFG/gD1Sbsjl4y/DSVhj+a945U9rXdeRKrwg3 PgPpRpXFSNHK31bPLGyzeMXTa5KSWYbC+CUiV+CY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114365] ICE: verify_ssa failed: definition in block 4 does not dominate use in block 5 at -O with _BitInt() shift in a bitfield Date: Wed, 20 Mar 2024 09:55:50 +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: P3 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=3D114365 --- Comment #2 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:456e10f28b36aa417e0db145556831c4f979fbd7 commit r14-9570-g456e10f28b36aa417e0db145556831c4f979fbd7 Author: Jakub Jelinek Date: Wed Mar 20 10:55:07 2024 +0100 bitint: Fix handling of conditional bitfield loads [PR114365] For the m_var_msb (aka left shift) case of large/huge _BitInt bitfield loads handle_load adds a PHI node, but I forgot to actually update the tempor= ary the code later on uses, so the PHI result was unused and the code incorrectly used something that wasn't valid SSA form. In particular, we emitted if (_29 !=3D 2) goto ; [80.00%] else goto ; [20.00%] [local count: 1073741824]: _33 =3D VIEW_CONVERT_EXPR(s.D.2771)[_31]; [local count: 1073741824]: # _34 =3D PHI <_33(4), 0(3)> _35 =3D _32 >> 31; _36 =3D _33 << 33; _37 =3D _36 | _35; _38 =3D _37 << _19; where instead of _33 the _36 def stmt should be using _34. Fixed thusly. 2024-03-20 Jakub Jelinek PR tree-optimization/114365 * gimple-lower-bitint.cc (bitint_large_huge::handle_load): When adding a PHI node, set iv2 to its result afterwards. * gcc.dg/bitint-102.c: New test.=