File: atomic_cmpxchg_20.ll

package info (click to toggle)
pocl 6.0-6
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 25,304 kB
  • sloc: lisp: 149,513; ansic: 103,778; cpp: 54,947; python: 1,513; sh: 949; ruby: 255; pascal: 226; tcl: 180; makefile: 173; java: 72; xml: 49
file content (206 lines) | stat: -rw-r--r-- 9,816 bytes parent folder | download | duplicates (2)
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

;     volatile __global A *object,
;    __local C *expected,
;    C desired,
;    memory_order success,
;    memory_order failure,
;    memory_scope scope)

; ######################### LOCAL


define zeroext i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomiciPii12memory_orderS4_12memory_scope(i32 addrspace(3)* noundef %0, i32* noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %cmpval = load atomic i32, i32* %1 monotonic , align 4
  %res = cmpxchg i32 addrspace(3)* %0, i32 %cmpval, i32 %2 monotonic monotonic
  %val_loaded = extractvalue {i32, i1} %res, 0
  %success = extractvalue { i32, i1 } %res, 1
  br i1 %success, label %true, label %false

false:
  store atomic i32 %val_loaded, i32* %1 monotonic, align 4
  br label %true

true:
  ret i1 %success
}

define zeroext i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomicjPjj12memory_orderS4_12memory_scope(i32 addrspace(3)* noundef %0, i32* noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %res = tail call i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomiciPii12memory_orderS4_12memory_scope(i32 addrspace(3)* %0, i32* %1, i32 %2, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}

define zeroext i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomicfPff12memory_orderS4_12memory_scope(i32 addrspace(3)* noundef %0, i32* noundef %1, float noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %newval = bitcast float %2 to i32
  %res = tail call i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomiciPii12memory_orderS4_12memory_scope(i32 addrspace(3)* %0, i32* %1, i32 %newval, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}





define zeroext i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomiclPll12memory_orderS4_12memory_scope(i64 addrspace(3)* noundef %0, i64* noundef %1, i64 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %cmpval = load atomic i64, i64* %1 monotonic , align 8
  %res = cmpxchg i64 addrspace(3)* %0, i64 %cmpval, i64 %2 monotonic monotonic
  %val_loaded = extractvalue {i64, i1} %res, 0
  %success = extractvalue { i64, i1 } %res, 1
  br i1 %success, label %true, label %false

false:
  store atomic i64 %val_loaded, i64* %1 monotonic, align 8
  br label %true

true:
  ret i1 %success
}

define zeroext i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomicmPmm12memory_orderS4_12memory_scope(i64 addrspace(3)* noundef %0, i64* noundef %1, i64 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %res = tail call i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomiclPll12memory_orderS4_12memory_scope(i64 addrspace(3)* %0, i64* %1, i64 %2, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}

define zeroext i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomicdPdd12memory_orderS4_12memory_scope(i64 addrspace(3)* noundef %0, i64* noundef %1, double noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %newval = bitcast double %2 to i64
  %res = tail call i1 @_Z44__pocl_atomic_compare_exchange_strong__localPU3AS3VU7_AtomiclPll12memory_orderS4_12memory_scope(i64 addrspace(3)* %0, i64* %1, i64 %newval, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}


; ######################### GLOBAL

define zeroext i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomiciPii12memory_orderS4_12memory_scope(i32 addrspace(1)* noundef %0, i32* noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %cmpval = load atomic i32, i32* %1 monotonic , align 4
  %res = cmpxchg i32 addrspace(1)* %0, i32 %cmpval, i32 %2 monotonic monotonic
  %val_loaded = extractvalue {i32, i1} %res, 0
  %success = extractvalue { i32, i1 } %res, 1
  br i1 %success, label %true, label %false

false:
  store atomic i32 %val_loaded, i32* %1 monotonic, align 4
  br label %true

true:
  ret i1 %success
}

define zeroext i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomicjPjj12memory_orderS4_12memory_scope(i32 addrspace(1)* noundef %0, i32* noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %res = tail call i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomiciPii12memory_orderS4_12memory_scope(i32 addrspace(1)* %0, i32* %1, i32 %2, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}

define zeroext i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomicfPff12memory_orderS4_12memory_scope(i32 addrspace(1)* noundef %0, i32* noundef %1, float noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %newval = bitcast float %2 to i32
  %res = tail call i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomiciPii12memory_orderS4_12memory_scope(i32 addrspace(1)* %0, i32* %1, i32 %newval, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}





define zeroext i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomiclPll12memory_orderS4_12memory_scope(i64 addrspace(1)* noundef %0, i64* noundef %1, i64 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %cmpval = load atomic i64, i64* %1 monotonic , align 8
  %res = cmpxchg i64 addrspace(1)* %0, i64 %cmpval, i64 %2 monotonic monotonic
  %val_loaded = extractvalue {i64, i1} %res, 0
  %success = extractvalue { i64, i1 } %res, 1
  br i1 %success, label %true, label %false

false:
  store atomic i64 %val_loaded, i64* %1 monotonic, align 8
  br label %true

true:
  ret i1 %success
}

define zeroext i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomicmPmm12memory_orderS4_12memory_scope(i64 addrspace(1)* noundef %0, i64* noundef %1, i64 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %res = tail call i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomiclPll12memory_orderS4_12memory_scope(i64 addrspace(1)* %0, i64* %1, i64 %2, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}

define zeroext i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomicdPdd12memory_orderS4_12memory_scope(i64 addrspace(1)* noundef %0, i64* noundef %1, double noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %newval = bitcast double %2 to i64
  %res = tail call i1 @_Z45__pocl_atomic_compare_exchange_strong__globalPU3AS1VU7_AtomiclPll12memory_orderS4_12memory_scope(i64 addrspace(1)* %0, i64* %1, i64 %newval, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}


; ######################### GENERIC


define zeroext i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomiciPii12memory_orderS4_12memory_scope(i32* noundef %0, i32* noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %cmpval = load atomic i32, i32* %1 monotonic , align 4
  %res = cmpxchg i32* %0, i32 %cmpval, i32 %2 monotonic monotonic
  %val_loaded = extractvalue {i32, i1} %res, 0
  %success = extractvalue { i32, i1 } %res, 1
  br i1 %success, label %true, label %false

false:
  store atomic i32 %val_loaded, i32* %1 monotonic, align 4
  br label %true

true:
  ret i1 %success
}

define zeroext i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomicjPjj12memory_orderS4_12memory_scope(i32* noundef %0, i32* noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %res = tail call i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomiciPii12memory_orderS4_12memory_scope(i32* %0, i32* %1, i32 %2, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}

define zeroext i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomicfPff12memory_orderS4_12memory_scope(i32* noundef %0, i32* noundef %1, float noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %newval = bitcast float %2 to i32
  %res = tail call i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomiciPii12memory_orderS4_12memory_scope(i32* %0, i32* %1, i32 %newval, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}







define zeroext i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomiclPll12memory_orderS4_12memory_scope(i64* noundef %0, i64* noundef %1, i64 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %cmpval = load atomic i64, i64* %1 monotonic , align 8
  %res = cmpxchg i64* %0, i64 %cmpval, i64 %2 monotonic monotonic
  %val_loaded = extractvalue {i64, i1} %res, 0
  %success = extractvalue { i64, i1 } %res, 1
  br i1 %success, label %true, label %false

false:
  store atomic i64 %val_loaded, i64* %1 monotonic, align 8
  br label %true

true:
  ret i1 %success
}

define zeroext i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomicmPmm12memory_orderS4_12memory_scope(i64* noundef %0, i64* noundef %1, i64 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %res = tail call i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomiclPll12memory_orderS4_12memory_scope(i64* %0, i64* %1, i64 %2, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}

define zeroext i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomicdPdd12memory_orderS4_12memory_scope(i64* noundef %0, i64* noundef %1, double noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #0 {
entry:
  %newval = bitcast double %2 to i64
  %res = tail call i1 @_Z46__pocl_atomic_compare_exchange_strong__genericPVU7_AtomiclPll12memory_orderS4_12memory_scope(i64* %0, i64* %1, i64 %newval, i32 %3, i32 %4, i32 %5)
  ret i1 %res
}