diff options
| author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2017-08-04 18:57:58 +0000 |
|---|---|---|
| committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2017-08-04 18:57:58 +0000 |
| commit | a11f63a952664f700f076fd754476a2b9eb158cc (patch) | |
| tree | 3f741cf70a27633e49f5005e1d14e62238b3e0ba /llvm/test/CodeGen/SystemZ/atomic-load-05.ll | |
| parent | 02f1c02c2710a3daacc098cae20b991ba5c8a7ec (diff) | |
| download | bcm5719-llvm-a11f63a952664f700f076fd754476a2b9eb158cc.tar.gz bcm5719-llvm-a11f63a952664f700f076fd754476a2b9eb158cc.zip | |
[SystemZ] Add support for 128-bit atomic load/store/cmpxchg
This adds support for the main 128-bit atomic operations,
using the SystemZ instructions LPQ, STPQ, and CDSG.
Generating these instructions is a bit more complex than usual
since the i128 type is not legal for the back-end. Therefore,
we have to hook the LowerOperationWrapper and ReplaceNodeResults
TargetLowering callbacks.
llvm-svn: 310094
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/atomic-load-05.ll')
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/atomic-load-05.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/atomic-load-05.ll b/llvm/test/CodeGen/SystemZ/atomic-load-05.ll new file mode 100644 index 00000000000..c527184ff23 --- /dev/null +++ b/llvm/test/CodeGen/SystemZ/atomic-load-05.ll @@ -0,0 +1,13 @@ +; Test 128-bit atomic loads. +; +; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s + +define i128 @f1(i128 *%src) { +; CHECK-LABEL: f1: +; CHECK: lpq %r0, 0(%r3) +; CHECK-DAG: stg %r1, 8(%r2) +; CHECK-DAG: stg %r0, 0(%r2) +; CHECK: br %r14 + %val = load atomic i128, i128 *%src seq_cst, align 16 + ret i128 %val +} |

