llvm.org GIT mirror llvm / release_50 test / CodeGen / X86 / atomic128.ll
release_50

Tree @release_50 (Download .tar.gz)

atomic128.ll @release_50raw · history · blame

  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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-apple-macosx10.9 -verify-machineinstrs -mattr=cx16 | FileCheck %s

@var = global i128 0

; Due to the scheduling right after isel for cmpxchg and given the
; machine scheduler and copy coalescer do not mess up with physical
; register live-ranges, we end up with a useless copy.
define i128 @val_compare_and_swap(i128* %p, i128 %oldval, i128 %newval) {
; CHECK-LABEL: val_compare_and_swap:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi0:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi1:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rcx, %r9
; CHECK-NEXT:    movq %rsi, %rax
; CHECK-NEXT:    movq %r8, %rcx
; CHECK-NEXT:    movq %r9, %rbx
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %pair = cmpxchg i128* %p, i128 %oldval, i128 %newval acquire acquire
  %val = extractvalue { i128, i1 } %pair, 0
  ret i128 %val
}

define void @fetch_and_nand(i128* %p, i128 %bits) {
; CHECK-LABEL: fetch_and_nand:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi2:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi3:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %r8
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB1_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    andq %r8, %rcx
; CHECK-NEXT:    movq %rax, %rbx
; CHECK-NEXT:    andq %rsi, %rbx
; CHECK-NEXT:    notq %rbx
; CHECK-NEXT:    notq %rcx
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB1_1
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.end
; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
; CHECK-NEXT:    movq %rdx, _var+{{.*}}(%rip)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %val = atomicrmw nand i128* %p, i128 %bits release
  store i128 %val, i128* @var, align 16
  ret void
}

define void @fetch_and_or(i128* %p, i128 %bits) {
; CHECK-LABEL: fetch_and_or:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi4:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi5:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %r8
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB2_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    movq %rax, %rbx
; CHECK-NEXT:    orq %rsi, %rbx
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    orq %r8, %rcx
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB2_1
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.end
; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
; CHECK-NEXT:    movq %rdx, _var+{{.*}}(%rip)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %val = atomicrmw or i128* %p, i128 %bits seq_cst
  store i128 %val, i128* @var, align 16
  ret void
}

define void @fetch_and_add(i128* %p, i128 %bits) {
; CHECK-LABEL: fetch_and_add:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi6:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi7:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %r8
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB3_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    movq %rax, %rbx
; CHECK-NEXT:    addq %rsi, %rbx
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    adcq %r8, %rcx
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB3_1
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.end
; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
; CHECK-NEXT:    movq %rdx, _var+{{.*}}(%rip)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %val = atomicrmw add i128* %p, i128 %bits seq_cst
  store i128 %val, i128* @var, align 16
  ret void
}

define void @fetch_and_sub(i128* %p, i128 %bits) {
; CHECK-LABEL: fetch_and_sub:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi8:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi9:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %r8
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB4_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    movq %rax, %rbx
; CHECK-NEXT:    subq %rsi, %rbx
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    sbbq %r8, %rcx
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB4_1
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.end
; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
; CHECK-NEXT:    movq %rdx, _var+{{.*}}(%rip)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %val = atomicrmw sub i128* %p, i128 %bits seq_cst
  store i128 %val, i128* @var, align 16
  ret void
}

define void @fetch_and_min(i128* %p, i128 %bits) {
; CHECK-LABEL: fetch_and_min:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi10:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi11:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %r8
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB5_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    cmpq %rax, %rsi
; CHECK-NEXT:    movq %r8, %rcx
; CHECK-NEXT:    sbbq %rdx, %rcx
; CHECK-NEXT:    setge %cl
; CHECK-NEXT:    andb $1, %cl
; CHECK-NEXT:    movq %rax, %rbx
; CHECK-NEXT:    jne LBB5_3
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB5_1 Depth=1
; CHECK-NEXT:    movq %rsi, %rbx
; CHECK-NEXT:  LBB5_3: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB5_1 Depth=1
; CHECK-NEXT:    testb %cl, %cl
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    jne LBB5_5
; CHECK-NEXT:  ## BB#4: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB5_1 Depth=1
; CHECK-NEXT:    movq %r8, %rcx
; CHECK-NEXT:  LBB5_5: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB5_1 Depth=1
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB5_1
; CHECK-NEXT:  ## BB#6: ## %atomicrmw.end
; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
; CHECK-NEXT:    movq %rdx, _var+{{.*}}(%rip)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %val = atomicrmw min i128* %p, i128 %bits seq_cst
  store i128 %val, i128* @var, align 16
  ret void
}

define void @fetch_and_max(i128* %p, i128 %bits) {
; CHECK-LABEL: fetch_and_max:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi12:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi13:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %r8
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB6_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    cmpq %rsi, %rax
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    sbbq %r8, %rcx
; CHECK-NEXT:    setge %cl
; CHECK-NEXT:    andb $1, %cl
; CHECK-NEXT:    movq %rax, %rbx
; CHECK-NEXT:    jne LBB6_3
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB6_1 Depth=1
; CHECK-NEXT:    movq %rsi, %rbx
; CHECK-NEXT:  LBB6_3: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB6_1 Depth=1
; CHECK-NEXT:    testb %cl, %cl
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    jne LBB6_5
; CHECK-NEXT:  ## BB#4: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB6_1 Depth=1
; CHECK-NEXT:    movq %r8, %rcx
; CHECK-NEXT:  LBB6_5: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB6_1 Depth=1
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB6_1
; CHECK-NEXT:  ## BB#6: ## %atomicrmw.end
; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
; CHECK-NEXT:    movq %rdx, _var+{{.*}}(%rip)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %val = atomicrmw max i128* %p, i128 %bits seq_cst
  store i128 %val, i128* @var, align 16
  ret void
}

define void @fetch_and_umin(i128* %p, i128 %bits) {
; CHECK-LABEL: fetch_and_umin:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi14:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi15:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %r8
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB7_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    cmpq %rax, %rsi
; CHECK-NEXT:    movq %r8, %rcx
; CHECK-NEXT:    sbbq %rdx, %rcx
; CHECK-NEXT:    setae %cl
; CHECK-NEXT:    andb $1, %cl
; CHECK-NEXT:    movq %rax, %rbx
; CHECK-NEXT:    jne LBB7_3
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB7_1 Depth=1
; CHECK-NEXT:    movq %rsi, %rbx
; CHECK-NEXT:  LBB7_3: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB7_1 Depth=1
; CHECK-NEXT:    testb %cl, %cl
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    jne LBB7_5
; CHECK-NEXT:  ## BB#4: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB7_1 Depth=1
; CHECK-NEXT:    movq %r8, %rcx
; CHECK-NEXT:  LBB7_5: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB7_1 Depth=1
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB7_1
; CHECK-NEXT:  ## BB#6: ## %atomicrmw.end
; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
; CHECK-NEXT:    movq %rdx, _var+{{.*}}(%rip)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %val = atomicrmw umin i128* %p, i128 %bits seq_cst
  store i128 %val, i128* @var, align 16
  ret void
}

define void @fetch_and_umax(i128* %p, i128 %bits) {
; CHECK-LABEL: fetch_and_umax:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi16:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi17:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %r8
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB8_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    cmpq %rax, %rsi
; CHECK-NEXT:    movq %r8, %rcx
; CHECK-NEXT:    sbbq %rdx, %rcx
; CHECK-NEXT:    setb %cl
; CHECK-NEXT:    andb $1, %cl
; CHECK-NEXT:    movq %rax, %rbx
; CHECK-NEXT:    jne LBB8_3
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB8_1 Depth=1
; CHECK-NEXT:    movq %rsi, %rbx
; CHECK-NEXT:  LBB8_3: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB8_1 Depth=1
; CHECK-NEXT:    testb %cl, %cl
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    jne LBB8_5
; CHECK-NEXT:  ## BB#4: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB8_1 Depth=1
; CHECK-NEXT:    movq %r8, %rcx
; CHECK-NEXT:  LBB8_5: ## %atomicrmw.start
; CHECK-NEXT:    ## in Loop: Header=BB8_1 Depth=1
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB8_1
; CHECK-NEXT:  ## BB#6: ## %atomicrmw.end
; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
; CHECK-NEXT:    movq %rdx, _var+{{.*}}(%rip)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
  %val = atomicrmw umax i128* %p, i128 %bits seq_cst
  store i128 %val, i128* @var, align 16
  ret void
}

define i128 @atomic_load_seq_cst(i128* %p) {
; CHECK-LABEL: atomic_load_seq_cst:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi18:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi19:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    xorl %eax, %eax
; CHECK-NEXT:    xorl %edx, %edx
; CHECK-NEXT:    xorl %ecx, %ecx
; CHECK-NEXT:    xorl %ebx, %ebx
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
   %r = load atomic i128, i128* %p seq_cst, align 16
   ret i128 %r
}

define i128 @atomic_load_relaxed(i128* %p) {
; CHECK-LABEL: atomic_load_relaxed:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi20:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi21:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    xorl %eax, %eax
; CHECK-NEXT:    xorl %edx, %edx
; CHECK-NEXT:    xorl %ecx, %ecx
; CHECK-NEXT:    xorl %ebx, %ebx
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
   %r = load atomic i128, i128* %p monotonic, align 16
   ret i128 %r
}

define void @atomic_store_seq_cst(i128* %p, i128 %in) {
; CHECK-LABEL: atomic_store_seq_cst:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi22:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi23:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    movq %rsi, %rbx
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB11_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB11_1
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.end
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
   store atomic i128 %in, i128* %p seq_cst, align 16
   ret void
}

define void @atomic_store_release(i128* %p, i128 %in) {
; CHECK-LABEL: atomic_store_release:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi24:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi25:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    movq %rsi, %rbx
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB12_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB12_1
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.end
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
   store atomic i128 %in, i128* %p release, align 16
   ret void
}

define void @atomic_store_relaxed(i128* %p, i128 %in) {
; CHECK-LABEL: atomic_store_relaxed:
; CHECK:       ## BB#0:
; CHECK-NEXT:    pushq %rbx
; CHECK-NEXT:  Lcfi26:
; CHECK-NEXT:    .cfi_def_cfa_offset 16
; CHECK-NEXT:  Lcfi27:
; CHECK-NEXT:    .cfi_offset %rbx, -16
; CHECK-NEXT:    movq %rdx, %rcx
; CHECK-NEXT:    movq %rsi, %rbx
; CHECK-NEXT:    movq (%rdi), %rax
; CHECK-NEXT:    movq 8(%rdi), %rdx
; CHECK-NEXT:    .p2align 4, 0x90
; CHECK-NEXT:  LBB13_1: ## %atomicrmw.start
; CHECK-NEXT:    ## =>This Inner Loop Header: Depth=1
; CHECK-NEXT:    lock cmpxchg16b (%rdi)
; CHECK-NEXT:    jne LBB13_1
; CHECK-NEXT:  ## BB#2: ## %atomicrmw.end
; CHECK-NEXT:    popq %rbx
; CHECK-NEXT:    retq
   store atomic i128 %in, i128* %p unordered, align 16
   ret void
}