Matthias Braun | e2d2ce9 | 2017-08-01 22:20:41 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=powerpc-apple-darwin -verify-machineinstrs | FileCheck %s |
| 2 | ; RUN: llc < %s -mtriple=powerpc64-apple-darwin -verify-machineinstrs | FileCheck %s |
Robin Morisset | 9098fee | 2014-10-03 18:04:36 +0000 | [diff] [blame] | 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 |
Hal Finkel | 7c5cb06 | 2015-04-23 18:30:38 +0000 | [diff] [blame] | 8 | ; CHECK: lwsync |
| 9 | ; PPC440-NOT: lwsync |
Robin Morisset | 9098fee | 2014-10-03 18:04:36 +0000 | [diff] [blame] | 10 | ; PPC440: msync |
| 11 | fence acquire |
| 12 | ret void |
| 13 | } |
| 14 | define void @fence_release() { |
| 15 | ; CHECK-LABEL: fence_release |
Hal Finkel | 7c5cb06 | 2015-04-23 18:30:38 +0000 | [diff] [blame] | 16 | ; CHECK: lwsync |
| 17 | ; PPC440-NOT: lwsync |
Robin Morisset | 9098fee | 2014-10-03 18:04:36 +0000 | [diff] [blame] | 18 | ; PPC440: msync |
| 19 | fence release |
| 20 | ret void |
| 21 | } |
| 22 | define void @fence_seq_cst() { |
| 23 | ; CHECK-LABEL: fence_seq_cst |
Hal Finkel | d86e90a | 2015-04-23 23:05:08 +0000 | [diff] [blame] | 24 | ; CHECK: sync |
Robin Morisset | 9098fee | 2014-10-03 18:04:36 +0000 | [diff] [blame] | 25 | ; PPC440: msync |
| 26 | fence seq_cst |
| 27 | ret void |
| 28 | } |