[Bug target/70821] x86_64: __atomic_fetch_add/sub() uses XADD rather than DECL in some cases
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 28 07:43:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70821
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-04-28
CC| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I don't see any xadd* insns if compiled with -O2, it doesn't indeed use lock;
decl, but lock; subl $1 or similar; but that is just the matter of generic
tuning which prefers not to use inc/dec; if you use e.g. -O2 -mtune=barcelona,
then you get even the lock; decl you are looking for.
So, are you testing with -Os instead?
More information about the Gcc-bugs
mailing list