xref: /llvm-project/llvm/test/CodeGen/PowerPC/atomics-fences.ll (revision f0990e104b0858fbdc4c726cd8da1ff166fe2dca)
1; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -verify-machineinstrs | FileCheck %s
2; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -verify-machineinstrs | FileCheck %s
3; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mcpu=440 | FileCheck %s --check-prefix=PPC440
4; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mcpu=e500 | FileCheck %s --check-prefix=PPC440
5
6; Fences
7define void @fence_acquire() {
8; CHECK-LABEL: fence_acquire
9; CHECK: lwsync
10; PPC440-NOT: lwsync
11; PPC440: msync
12  fence acquire
13  ret void
14}
15define void @fence_release() {
16; CHECK-LABEL: fence_release
17; CHECK: lwsync
18; PPC440-NOT: lwsync
19; PPC440: msync
20  fence release
21  ret void
22}
23define void @fence_seq_cst() {
24; CHECK-LABEL: fence_seq_cst
25; CHECK: sync
26; PPC440: msync
27  fence seq_cst
28  ret void
29}
30