mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310093 91177308-0d34-0410-b5e6-96231b3b80d8
12 lines
246 B
LLVM
12 lines
246 B
LLVM
; Test 64-bit atomic loads.
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
|
|
|
|
define i64 @f1(i64 *%src) {
|
|
; CHECK-LABEL: f1:
|
|
; CHECK: lg %r2, 0(%r2)
|
|
; CHECK: br %r14
|
|
%val = load atomic i64 , i64 *%src seq_cst, align 8
|
|
ret i64 %val
|
|
}
|