From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 987763858C78; Wed, 10 Apr 2024 11:33:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 987763858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712748805; bh=VYWaV7BPClSzBDNANajLi8VpleUhJ6MXUZvaJl18KP0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bT5k9YuFUGW/hLU/NbLlkVDLuMRGy6g3dkXx5KqwNOcr1ObHlhsXykrRiyBx7KU/9 9nXXL5fxfTswqNraeEU4HsfE/ZsLfmV6ZCDP3nxHiX/j50sxdvlFlu2BoFlvEj5/0p AHQr2sYzax1PPGQ2yG1PhflOnbGH9vYZcYpkJtDA= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114676] [12/13/14 Regression] DSE removes assignment that is used later Date: Wed, 10 Apr 2024 11:33:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.4 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=3D114676 --- Comment #5 from Andrew Pinski --- > I've bisected gcc, and issue first appears with gcc commit > 32955416d8040b1fa1ba21cd4179b3264e6c5bd6. This just improved DSE but I suspect there might be a way to reproduce it before that. Note the rs6000 backend works correctly with vec_sxt/vec_xl because it buil= ds a MEM_REF directly instead of an INDIRECT_REF. ``` /* Since arg1 may be cast to a different type, just use ptr_type_no= de here instead of trying to enforce TBAA on pointer types. */ tree arg1_type =3D ptr_type_node; ... /* Use the build2 helper to set up the mem_ref. The MEM_REF could = also take an offset, but since we've already incorporated the offset above, here we just pass in a zero. */ gimple *g =3D gimple_build_assign (lhs, build2 (MEM_REF, lhs_type, aligned_= addr, build_int_cst (arg1_type, 0))= ); ``` arg1_type is used for the aliasing set ...=