From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3770C38518B9; Mon, 14 Nov 2022 17:26:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3770C38518B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668446806; bh=R0Bv5kZn8xv+e12kLYpBFcsy58BIQtUDRGoP7jcN+H0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eroe8nPuTI0bEqmxd5sK7gl8ES2sBpzC88vf1BguZPeVxBY02jBuodRRPi7xe4wCN K7xNNFH/lqe/lYFa8Z44gL6o3cZOPJ7HbaUhfUgUoPHtGqu3BKOu4P+driDjNfT8Hn U+zP964lWmPArx6k+iKfkh7rguQOW4ADLqKAEWwE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107676] Nonsensical docs for -mrelax-cmpxchg-loop Date: Mon, 14 Nov 2022 17:26:46 +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: documentation 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=3D107676 --- Comment #5 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #4) > I don't think __atomic_compare_exchange emits such a loop. This is about > __atomic_fetch_xor and friends, which do emit cmpxchg loops. But there are > four such functions to name. Oh yes right. Then this: For compare and exchange loops that are emitted by some __atomic_* builtins (e.g. ....), emit an atomic load before the loop and if the value was not t= he expected value, emit a pause instruction. This might reduce execussive cache bouncing of the memory. I think that is better wording than it was before. I hope the person who ad= ded this option can take over this to get it closer to what it should be.=