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.