[SystemZ] Eliminate unnecessary serialization operations
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 4 Aug 2017 18:53:35 +0000 (18:53 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 4 Aug 2017 18:53:35 +0000 (18:53 +0000)
commit02f1c02c2710a3daacc098cae20b991ba5c8a7ec
tree07100f7c9853068576877d764fc90704daa3c4b8
parent38197c66a1f10bf1e73427ebbab78365ab30b6ad
[SystemZ] Eliminate unnecessary serialization operations

We currently emit a serialization operation (bcr 14, 0) before every
atomic load and after every atomic store.  This is overly conservative.
The SystemZ architecture actually does not require any serialization
for atomic loads, and a serialization after an atomic store only if
we need to enforce sequential consistency.  This is what other compilers
for the platform implement as well.

llvm-svn: 310093
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/test/CodeGen/SystemZ/atomic-load-01.ll
llvm/test/CodeGen/SystemZ/atomic-load-02.ll
llvm/test/CodeGen/SystemZ/atomic-load-03.ll
llvm/test/CodeGen/SystemZ/atomic-load-04.ll
llvm/test/CodeGen/SystemZ/atomic-store-01.ll
llvm/test/CodeGen/SystemZ/atomic-store-02.ll
llvm/test/CodeGen/SystemZ/atomic-store-03.ll
llvm/test/CodeGen/SystemZ/atomic-store-04.ll