2011-11-29 Andrew MacLeod <amacleod@redhat.com>
commit004ca39da1a62c5ab5c17ea584010a001bdc40f7
authoramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Nov 2011 19:42:44 +0000 (29 19:42 +0000)
committeramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Nov 2011 19:42:44 +0000 (29 19:42 +0000)
tree0941a5f3f350e92aa547e0c78f48f37d4ee5250d
parentcd378f1dd59d1a6c5178bf12094ffea53189e235
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181815 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/atomic-op-optimize.c [new file with mode: 0644]