This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54087] __atomic_fetch_add does not use xadd instruction
- From: "amacleod at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Aug 2012 14:33:01 +0000
- Subject: [Bug target/54087] __atomic_fetch_add does not use xadd instruction
- Auto-submitted: auto-generated
- References: <bug-54087-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54087
Andrew Macleod <amacleod at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #27927|0 |1
is obsolete| |
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-08-23
AssignedTo|unassigned at gcc dot |amacleod at redhat dot com
|gnu.org |
Ever Confirmed|0 |1
--- Comment #7 from Andrew Macleod <amacleod at redhat dot com> 2012-08-23 14:33:01 UTC ---
Created attachment 28074
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28074
Generic expansion patch proposal
This patch changes the tree-rtl expansion code to try using the complementary
atomic add or sub operation with a negative operand if an instruction sequence
is not created.
This will enable the optimization automatically for all targets.
Check to see if it solves the problem as well.