File: atomic-fence.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (100 lines) | stat: -rw-r--r-- 2,647 bytes parent folder | download | duplicates (7)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
; RUN:   | FileCheck --check-prefixes=CHECK,WMO %s
; RUN: llc -mtriple=riscv32 -mattr=+a -verify-machineinstrs < %s \
; RUN:   | FileCheck --check-prefixes=CHECK,WMO %s
; RUN: llc -mtriple=riscv32 -mattr=+a,+ztso -verify-machineinstrs < %s \
; RUN:   | FileCheck --check-prefixes=CHECK,TSO %s
; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
; RUN:   | FileCheck --check-prefixes=CHECK,WMO %s
; RUN: llc -mtriple=riscv64 -mattr=+a -verify-machineinstrs < %s \
; RUN:   | FileCheck --check-prefixes=CHECK,WMO %s
; RUN: llc -mtriple=riscv64 -mattr=+a,+ztso -verify-machineinstrs < %s \
; RUN:   | FileCheck --check-prefixes=CHECK,TSO %s

define void @fence_acquire() nounwind {
; WMO-LABEL: fence_acquire:
; WMO:       # %bb.0:
; WMO-NEXT:    fence r, rw
; WMO-NEXT:    ret
;
; TSO-LABEL: fence_acquire:
; TSO:       # %bb.0:
; TSO-NEXT:    #MEMBARRIER
; TSO-NEXT:    ret
  fence acquire
  ret void
}

define void @fence_release() nounwind {
; WMO-LABEL: fence_release:
; WMO:       # %bb.0:
; WMO-NEXT:    fence rw, w
; WMO-NEXT:    ret
;
; TSO-LABEL: fence_release:
; TSO:       # %bb.0:
; TSO-NEXT:    #MEMBARRIER
; TSO-NEXT:    ret
  fence release
  ret void
}

define void @fence_acq_rel() nounwind {
; WMO-LABEL: fence_acq_rel:
; WMO:       # %bb.0:
; WMO-NEXT:    fence.tso
; WMO-NEXT:    ret
;
; TSO-LABEL: fence_acq_rel:
; TSO:       # %bb.0:
; TSO-NEXT:    #MEMBARRIER
; TSO-NEXT:    ret
  fence acq_rel
  ret void
}

define void @fence_seq_cst() nounwind {
; CHECK-LABEL: fence_seq_cst:
; CHECK:       # %bb.0:
; CHECK-NEXT:    fence rw, rw
; CHECK-NEXT:    ret
  fence seq_cst
  ret void
}

define void @fence_singlethread_acquire() nounwind {
; CHECK-LABEL: fence_singlethread_acquire:
; CHECK:       # %bb.0:
; CHECK-NEXT:    #MEMBARRIER
; CHECK-NEXT:    ret
  fence syncscope("singlethread") acquire
  ret void
}

define void @fence_singlethread_release() nounwind {
; CHECK-LABEL: fence_singlethread_release:
; CHECK:       # %bb.0:
; CHECK-NEXT:    #MEMBARRIER
; CHECK-NEXT:    ret
  fence syncscope("singlethread") release
  ret void
}

define void @fence_singlethread_acq_rel() nounwind {
; CHECK-LABEL: fence_singlethread_acq_rel:
; CHECK:       # %bb.0:
; CHECK-NEXT:    #MEMBARRIER
; CHECK-NEXT:    ret
  fence syncscope("singlethread") acq_rel
  ret void
}

define void @fence_singlethread_seq_cst() nounwind {
; CHECK-LABEL: fence_singlethread_seq_cst:
; CHECK:       # %bb.0:
; CHECK-NEXT:    #MEMBARRIER
; CHECK-NEXT:    ret
  fence syncscope("singlethread") seq_cst
  ret void
}