summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/atomic-store-03.ll
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-10 10:49:34 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-10 10:49:34 +0000
commitbef3d7af2b8d0153a6935faa776ed1495d3e5e5e (patch)
tree3f62a923ee7d2c523386c80ed8756805a71fd9a9 /llvm/test/CodeGen/SystemZ/atomic-store-03.ll
parent9afe613d121c99e66ca2224dcb426604867151e3 (diff)
downloadbcm5719-llvm-bef3d7af2b8d0153a6935faa776ed1495d3e5e5e.tar.gz
bcm5719-llvm-bef3d7af2b8d0153a6935faa776ed1495d3e5e5e.zip
Add TargetLowering::prepareVolatileOrAtomicLoad
One unusual feature of the z architecture is that the result of a previous load can be reused indefinitely for subsequent loads, even if a cache-coherent store to that location is performed by another CPU. A special serializing instruction must be used if you want to force a load to be reattempted. Since volatile loads are not supposed to be omitted in this way, we should insert a serializing instruction before each such load. The same goes for atomic loads. The patch implements this at the IR->DAG boundary, in a similar way to atomic fences. It is a no-op for targets other than SystemZ. llvm-svn: 196906
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/atomic-store-03.ll')
-rw-r--r--llvm/test/CodeGen/SystemZ/atomic-store-03.ll8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/SystemZ/atomic-store-03.ll b/llvm/test/CodeGen/SystemZ/atomic-store-03.ll
index 846c86fd366..459cb6a94e1 100644
--- a/llvm/test/CodeGen/SystemZ/atomic-store-03.ll
+++ b/llvm/test/CodeGen/SystemZ/atomic-store-03.ll
@@ -2,14 +2,10 @@
;
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
-; This is just a placeholder to make sure that stores are handled.
-; Using CS is probably too conservative.
define void @f1(i32 %val, i32 *%src) {
; CHECK-LABEL: f1:
-; CHECK: l %r0, 0(%r3)
-; CHECK: [[LABEL:\.[^:]*]]:
-; CHECK: cs %r0, %r2, 0(%r3)
-; CHECK: jl [[LABEL]]
+; CHECK: st %r2, 0(%r3)
+; CHECK: bcr 1{{[45]}}, %r0
; CHECK: br %r14
store atomic i32 %val, i32 *%src seq_cst, align 4
ret void
OpenPOWER on IntegriCloud