diff options
author | konglin1 <lingling.kong@intel.com> | 2022-11-07 11:21:14 +0800 |
---|---|---|
committer | konglin1 <lingling.kong@intel.com> | 2022-11-07 11:21:17 +0800 |
commit | 48fa4131e419942efc9dd762694fdc7e819de392 (patch) | |
tree | 328441a50522b2b07e240a1c34eae4c44057347e /gcc/doc | |
parent | 4cf1c61995f5221edf51bb7f34e4b000fe558753 (diff) | |
download | gcc-48fa4131e419942efc9dd762694fdc7e819de392.zip gcc-48fa4131e419942efc9dd762694fdc7e819de392.tar.gz gcc-48fa4131e419942efc9dd762694fdc7e819de392.tar.bz2 |
i386: Prefer remote atomic insn for atomic_fetch{add, and, or, xor}
Add flag -mprefer-remote-atomic to control whether to generate raoint
insn for atomic operations.
gcc/ChangeLog:
* config/i386/i386.opt:Add -mprefer-remote-atomic.
* config/i386/sync.md (atomic_<plus_logic><mode>):
New define_expand.
(atomic_add<mode>): Rename to below one.
(atomic_add<mode>_1): To this.
(atomic_<logic><mode>): Ditto.
(atomic_<logic><mode>_1): Ditto.
* doc/invoke.texi: Add -mprefer-remote-atomic.
gcc/testsuite/ChangeLog:
* gcc.target/i386/raoint-atomic-fetch.c: New test.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7417f52..fa6adfd 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1438,7 +1438,7 @@ See RS/6000 and PowerPC Options. -mrdseed -msgx -mavx512vp2intersect -mserialize -mtsxldtrk@gol -mamx-tile -mamx-int8 -mamx-bf16 -muintr -mhreset -mavxvnni@gol -mavx512fp16 -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 @gol --mprefetchi -mraoint @gol +-mprefetchi -mraoint -mprefer-remote-atomic@gol -mcldemote -mms-bitfields -mno-align-stringops -minline-all-stringops @gol -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol -mkl -mwidekl @gol @@ -33666,6 +33666,10 @@ 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. +@item -mprefer-remote-atomic +@opindex mprefer-remote-atomic +Prefer use remote atomic insn for atomic operations. + @item -mindirect-branch=@var{choice} @opindex mindirect-branch Convert indirect call and jump with @var{choice}. The default is |