Robin Morisset | 9098fee | 2014-10-03 18:04:36 +0000 | [diff] [blame^] | 1 | ; 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 |
| 6 | define void @fence_acquire() { |
| 7 | ; CHECK-LABEL: fence_acquire |
| 8 | ; CHECK: sync 1 |
| 9 | ; PPC440-NOT: sync 1 |
| 10 | ; PPC440: msync |
| 11 | fence acquire |
| 12 | ret void |
| 13 | } |
| 14 | define void @fence_release() { |
| 15 | ; CHECK-LABEL: fence_release |
| 16 | ; CHECK: sync 1 |
| 17 | ; PPC440-NOT: sync 1 |
| 18 | ; PPC440: msync |
| 19 | fence release |
| 20 | ret void |
| 21 | } |
| 22 | define 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 | } |