optabs: ensure mem_thread_fence is a compiler barrier
authorAlexander Monakov <amonakov@ispras.ru>
Mon, 28 Aug 2017 10:58:45 +0000 (13:58 +0300)
committerAlexander Monakov <amonakov@gcc.gnu.org>
Mon, 28 Aug 2017 10:58:45 +0000 (13:58 +0300)
commit5e5ccf0d20b1104a1ec084f1de4dbbc312e9540e
tree6bf7d946daf2fa68b3387a59f7b4ffce4b0f597b
parentbf498b07586693bd0751a7aed15be59cd3f96206
optabs: ensure mem_thread_fence is a compiler barrier

PR target/80640
* doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
* optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
using targetm.gen_mem_thread_fence.
testsuite/
* gcc.dg/atomic/pr80640.c: New testcase.

From-SVN: r251377
gcc/ChangeLog
gcc/doc/md.texi
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/atomic/pr80640.c [new file with mode: 0644]