blob: 09dd61f4ac5384c671cb60a824469057ccfe795f [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
24; CHECK: sync 0
25; PPC440-NOT: sync 0
26; PPC440: msync
27 fence seq_cst
28 ret void
29}