http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54087
--- Comment #9 from Andrew Macleod <amacleod at redhat dot com> 2012-10-01 15:50:26 UTC --- Author: amacleod Date: Mon Oct 1 15:50:09 2012 New Revision: 191929 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191929 Log: 2012-10-01 Andrew MacLeod <amacl...@redhat.com> PR target/54087 * optabs.c (expand_atomic_fetch_op_no_fallback): New. Factored code from expand_atomic_fetch_op. (expand_atomic_fetch_op): Try atomic_{add|sub} operations in terms of the other one if direct opcode fails. * testsuite/gcc.dg/pr54087.c: New testcase for atomic_sub -> atomic_add when atomic_sub fails. Added: trunk/gcc/testsuite/gcc.dg/pr54087.c Modified: trunk/gcc/ChangeLog trunk/gcc/optabs.c trunk/gcc/testsuite/ChangeLog