blob: c015fa6eefb05f87c0ea83015719032938ea4f1e [file] [log] [blame]
Robin Morisset9098fee2014-10-03 18:04:36 +00001; RUN: llc < %s -mtriple=powerpc-apple-darwin -march=ppc32 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK
2; RUN: llc < %s -mtriple=powerpc-apple-darwin -march=ppc64 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK
3; RUN: llc < %s -mtriple=powerpc-apple-darwin -mcpu=440 | FileCheck %s --check-prefix=PPC440
4
5; Fences
6define void @fence_acquire() {
7; CHECK-LABEL: fence_acquire
Hal Finkel7c5cb062015-04-23 18:30:38 +00008; CHECK: lwsync
9; PPC440-NOT: lwsync
Robin Morisset9098fee2014-10-03 18:04:36 +000010; PPC440: msync
11 fence acquire
12 ret void
13}
14define void @fence_release() {
15; CHECK-LABEL: fence_release
Hal Finkel7c5cb062015-04-23 18:30:38 +000016; CHECK: lwsync
17; PPC440-NOT: lwsync
Robin Morisset9098fee2014-10-03 18:04:36 +000018; PPC440: msync
19 fence release
20 ret void
21}
22define void @fence_seq_cst() {
23; CHECK-LABEL: fence_seq_cst
Hal Finkeld86e90a2015-04-23 23:05:08 +000024; CHECK: sync
Robin Morisset9098fee2014-10-03 18:04:36 +000025; PPC440: msync
26 fence seq_cst
27 ret void
28}