[Bug target/50123] cmpxchg generated for atomic and with zero/or with -1

amacleod at redhat dot com gcc-bugzilla@gcc.gnu.org
Tue Nov 29 21:06:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50123

--- Comment #2 from Andrew Macleod <amacleod at redhat dot com> 2011-11-29 19:42:50 UTC ---
Author: amacleod
Date: Tue Nov 29 19:42:44 2011
New Revision: 181815

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181815
Log:
2011-11-29  Andrew MacLeod  <amacleod@redhat.com>

    PR target/50123
    * optabs.c (maybe_optimize_fetch_op): New.  Look for more optimal
    instructions for a FECTH_OP or OP_FECTH sequence.
    (expand_atomic_fetch_op): Call maybe_optimize_fetch_op.
    * testsuite/gcc.dg/atomic-op-optimize.c: New.  Test for optimizations.


Added:
    trunk/gcc/testsuite/gcc.dg/atomic-op-optimize.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/optabs.c
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-bugs mailing list