From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B92F83858C20; Sat, 25 Nov 2023 20:04:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B92F83858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700942656; bh=3nfb2te2jJtJog3Dts5fSO8Y3SnBvPw2X9NBlGJK7is=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JZ7gO2EenoTw2x/+yxT0Ayzx3U3onFHQ1/8bwF3o2vDW77YQaJvu2hTmk44lzoEHN 2He1FcaaEBGbl2hUBk5NzKRdtlu1f8IBAIZsB+yEyhDGfmCII+hjAI7iWZIaeXnhbg 8Q2Z4KHrO2tghsUkaM8Gs+D3l/44+OXL8HxotEkw= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112711] [14 Regression] SRA seems to ignore writes when using __builtin_assume_aligned Date: Sat, 25 Nov 2023 20:04:16 +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: alias, 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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on target_milestone short_desc component everconfirmed bug_status keywords 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=3D112711 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-11-25 Target Milestone|--- |14.0 Summary|[14 Regression] possibly |[14 Regression] SRA seems |wrong code in bswap32(int) |to ignore writes when using |on llvm-16.0.6 test suite |__builtin_assume_aligned Component|target |tree-optimization Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Keywords| |alias --- Comment #1 from Andrew Pinski --- It has nothing to do with __builtin_bswap32 really but rather __builtin_assume_aligned and the memcpy. SRA does not detect: _9 =3D __builtin_assume_aligned (&data, 1); MEM [(char * {ref-all})_9] =3D 3451308718; _1 =3D data[0]; The store to _9 as touching data ...=