xref: /llvm-project/llvm/test/CodeGen/M68k/CodeModel/Large/Atomics/fence.ll (revision 4cce10743d2275710d3d2e0de8013386a9799092)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2; RUN: llc -mtriple=m68k-linux-gnu --code-model=large < %s | FileCheck %s
3; RUN: llc -mtriple=m68k-linux-gnu --code-model=large --relocation-model=pic < %s | FileCheck %s --check-prefix=PIC
4
5; M68k's libgcc does NOT have __sync_synchronize so we shouldn't
6; lower to that.
7
8define void @atomic_fence() {
9; CHECK-LABEL: atomic_fence:
10; CHECK:         .cfi_startproc
11; CHECK-NEXT:  ; %bb.0: ; %entry
12; CHECK-NEXT:    ;APP
13; CHECK-NEXT:    ;NO_APP
14; CHECK-NEXT:    ;APP
15; CHECK-NEXT:    ;NO_APP
16; CHECK-NEXT:    ;APP
17; CHECK-NEXT:    ;NO_APP
18; CHECK-NEXT:    ;APP
19; CHECK-NEXT:    ;NO_APP
20; CHECK-NEXT:    rts
21;
22; PIC-LABEL: atomic_fence:
23; PIC:         .cfi_startproc
24; PIC-NEXT:  ; %bb.0: ; %entry
25; PIC-NEXT:    ;APP
26; PIC-NEXT:    ;NO_APP
27; PIC-NEXT:    ;APP
28; PIC-NEXT:    ;NO_APP
29; PIC-NEXT:    ;APP
30; PIC-NEXT:    ;NO_APP
31; PIC-NEXT:    ;APP
32; PIC-NEXT:    ;NO_APP
33; PIC-NEXT:    rts
34entry:
35  fence acquire
36  fence release
37  fence acq_rel
38  fence seq_cst
39  ret void
40}
41
42