From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7ABDF3858C52; Fri, 3 Feb 2023 22:45:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7ABDF3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675464333; bh=6jLZlpXY1gr0FfAF04N88//fWHuvZzdn2GzXEjO5PlQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XKSNJaQ9JXKT8DA6kUkc2Ry5LzvvKP5E+h+t8FCwM7jvzOggFWAkOxdAUUL1EPVjf J7DuPQcrMfjQBN7zD8TjmKIo/Gkzyxtc8k8XCg0l6O52M9++fH4LIe3mj+AWCbJKXY 0NF5HqlClQHdUzRwELB+OcUggfnjGyZ6DuqyBCLc= From: "wilco at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108659] Suboptimal 128 bit atomics codegen on AArch64 and x64 Date: Fri, 03 Feb 2023 22:45:33 +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.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wilco 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: --- 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=3D108659 --- Comment #11 from Wilco --- (In reply to Niall Douglas from comment #10) > (In reply to Jakub Jelinek from comment #9) > > (In reply to Wilco from comment #8) > > > Yes that sounds like a reasonable approach. > >=20 > > I don't think so. Not all variables on which __atomic_* intrinsics are= used > > are actually _Atomic, the vars can be embedded in const aggregates etc. >=20 > I'd have the attribute propagate to enclosing types, like over-alignment. Yes, a structure with a 128-bit Atomic type in a subfield/union would be fo= rced to rwdata. And arbitrary casts (eg. from char* to an atomic type) wouldn't work due to Atomics requiring strict alignment. A 128-bit atomic type might have a high= er alignment than a 128-bit integer so even casting that seems questionable.=