aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/AArch64/fence-singlethread.ll
blob: eb77daa252417cb272178b334419c9814023ca0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: llc -mtriple=aarch64-linux-gnu %s -o - | FileCheck %s --check-prefix=LINUX
; RUN: llc -mtriple=aarch64-apple-ios %s -o - | FileCheck %s --check-prefix=IOS
; RUN: llc -mtriple=aarch64-apple-ios %s -o - -global-isel | FileCheck %s --check-prefix=IOS
; RUN: llc -mtriple=aarch64 %s -filetype=obj -o %t
; RUN: llvm-objdump -d %t | FileCheck %s --check-prefix=OBJ

; OBJ-NOT: dmb

define void @fence_singlethread() {
; LINUX-LABEL: fence_singlethread:
; LINUX-NOT: dmb
; LINUX: //MEMBARRIER
; LINUX-NOT: dmb

; IOS-LABEL: fence_singlethread:
; IOS-NOT: dmb
; IOS: ;MEMBARRIER
; IOS-NOT: dmb

  fence syncscope("singlethread") seq_cst
  ret void
}