From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 88ADE3858D1E; Thu, 22 Dec 2022 18:29:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88ADE3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671733758; bh=sro73m856pkWFGWIOd0MKzoDhOZnpx4lwZnZDUQrwbY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=G/Mj52HyENJWAWXjBo4fCthOezu3opK/9Q0VtG/O8GSylzniUlzFCKfKhK41Uha/u 8HPSjHOByq1ZhMJAEjNIiYLnUmyJCD9yH5FKspCWLbnASVo4o0WT+5fJ2iFptxWdfa CaUTmjMUx3WdkEtW0HUP/3uKZb+Rs6QdaGxVTyrY= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108199] Bitfields, unions and SRA and storage_order_attribute Date: Thu, 22 Dec 2022 18:29:18 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D108199 --- Comment #6 from Andrew Pinski --- (In reply to Andreas Krebbel from comment #5) > In: >=20 > _1 =3D src_6(D)->a; > dst$val_9 =3D _1; > _2 =3D BIT_FIELD_REF ; > _3 =3D _2 & 64; > if (_3 !=3D 0) There is only 2 accesses going on in the above IR because SRA removed the 3= rd when it replaced the access of dst.val with dst$val but didn't update BIT_FIELD_REF to remove the byteswap ...=