aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/M68k/CodeModel/Large/Atomics/fence.ll
blob: 727c4d1192b87bd772b570ee20009051c69e0266 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc -mtriple=m68k-linux-gnu --code-model=large < %s | FileCheck %s
; RUN: llc -mtriple=m68k-linux-gnu --code-model=large --relocation-model=pic < %s | FileCheck %s --check-prefix=PIC

; M68k's libgcc does NOT have __sync_synchronize so we shouldn't
; lower to that.

define void @atomic_fence() {
; CHECK-LABEL: atomic_fence:
; CHECK:         .cfi_startproc
; CHECK-NEXT:  ; %bb.0: ; %entry
; CHECK-NEXT:    ;APP
; CHECK-NEXT:    ;NO_APP
; CHECK-NEXT:    ;APP
; CHECK-NEXT:    ;NO_APP
; CHECK-NEXT:    ;APP
; CHECK-NEXT:    ;NO_APP
; CHECK-NEXT:    ;APP
; CHECK-NEXT:    ;NO_APP
; CHECK-NEXT:    rts
;
; PIC-LABEL: atomic_fence:
; PIC:         .cfi_startproc
; PIC-NEXT:  ; %bb.0: ; %entry
; PIC-NEXT:    ;APP
; PIC-NEXT:    ;NO_APP
; PIC-NEXT:    ;APP
; PIC-NEXT:    ;NO_APP
; PIC-NEXT:    ;APP
; PIC-NEXT:    ;NO_APP
; PIC-NEXT:    ;APP
; PIC-NEXT:    ;NO_APP
; PIC-NEXT:    rts
entry:
  fence acquire
  fence release
  fence acq_rel
  fence seq_cst
  ret void
}