On 15/11/22 11:35 +0800, Hongyu Wang wrote:
Hi,

According to PR 107676, the document of -mrelax-cmpxchg-loop is nonsensical.
Adjust the wording according to the comments.

Bootstrapped on x86_64-pc-linux-gnu, ok for trunk?

gcc/ChangeLog:

        PR target/107676
        * doc/invoke.texi: Reword the description of
        -mrelax-cmpxchg-loop.
---
gcc/doc/invoke.texi | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 40f667a630a..bdd7c319aef 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -33805,10 +33805,12 @@ registers.

@item -mrelax-cmpxchg-loop
@opindex mrelax-cmpxchg-loop
-Relax cmpxchg loop by emitting an early load and compare before cmpxchg,
-execute pause if load value is not expected. This reduces excessive
-cachline bouncing when and works for all atomic logic fetch builtins
-that generates compare and swap loop.
+For compare and swap loops that emitted by some __atomic_* builtins

s/that emitted/that are emitted/

+(e.g. __atomic_fetch_(or|and|xor|nand) and their __atomic_*_fetch
+counterparts), emit an atomic load before cmpxchg instruction. If the

s/before cmpxchg/before the cmpxchg/

+loaded value is not equal to expected, execute a pause instead of

s/not equal to expected/not equal to the expected/

+directly run the cmpxchg instruction. This might reduce excessive

s/directly run/directly running/

+cacheline bouncing.

@item -mindirect-branch=@var{choice}
@opindex mindirect-branch

Reply via email to