1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-macosx10.9 -verify-machineinstrs -mattr=cx16 | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker@var = global i128 0 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdefine i128 @val_compare_and_swap(i128* %p, i128 %oldval, i128 %newval) { 6*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: val_compare_and_swap: 7*9880d681SAndroid Build Coastguard Worker; Due to the scheduling right after isel for cmpxchg and given the 8*9880d681SAndroid Build Coastguard Worker; machine scheduler and copy coalescer do not mess up with physical 9*9880d681SAndroid Build Coastguard Worker; register live-ranges, we end up with a useless copy. 10*9880d681SAndroid Build Coastguard Worker; 11*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rcx, [[TMP:%r[0-9a-z]+]] 12*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rsi, %rax 13*9880d681SAndroid Build Coastguard Worker; CHECK: movq %r8, %rcx 14*9880d681SAndroid Build Coastguard Worker; CHECK: movq [[TMP]], %rbx 15*9880d681SAndroid Build Coastguard Worker; CHECK: lock 16*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker %pair = cmpxchg i128* %p, i128 %oldval, i128 %newval acquire acquire 19*9880d681SAndroid Build Coastguard Worker %val = extractvalue { i128, i1 } %pair, 0 20*9880d681SAndroid Build Coastguard Worker ret i128 %val 21*9880d681SAndroid Build Coastguard Worker} 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Workerdefine void @fetch_and_nand(i128* %p, i128 %bits) { 24*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fetch_and_nand: 25*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq %rdx, [[INCHI:%[a-z0-9]+]] 26*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq (%rdi), %rax 27*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq 8(%rdi), %rdx 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 30*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, %rcx 31*9880d681SAndroid Build Coastguard Worker; CHECK: andq [[INCHI]], %rcx 32*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, %rbx 33*9880d681SAndroid Build Coastguard Worker ; INCLO equivalent comes in in %rsi, so it makes sense it stays there. 34*9880d681SAndroid Build Coastguard Worker; CHECK: andq %rsi, %rbx 35*9880d681SAndroid Build Coastguard Worker; CHECK: notq %rbx 36*9880d681SAndroid Build Coastguard Worker; CHECK: notq %rcx 37*9880d681SAndroid Build Coastguard Worker; CHECK: lock 38*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 39*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, _var 42*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, _var+8 43*9880d681SAndroid Build Coastguard Worker %val = atomicrmw nand i128* %p, i128 %bits release 44*9880d681SAndroid Build Coastguard Worker store i128 %val, i128* @var, align 16 45*9880d681SAndroid Build Coastguard Worker ret void 46*9880d681SAndroid Build Coastguard Worker} 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Workerdefine void @fetch_and_or(i128* %p, i128 %bits) { 49*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fetch_and_or: 50*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq %rdx, [[INCHI:%[a-z0-9]+]] 51*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq (%rdi), %rax 52*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq 8(%rdi), %rdx 53*9880d681SAndroid Build Coastguard Worker 54*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 55*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, %rbx 56*9880d681SAndroid Build Coastguard Worker ; INCLO equivalent comes in in %rsi, so it makes sense it stays there. 57*9880d681SAndroid Build Coastguard Worker; CHECK: orq %rsi, %rbx 58*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, %rcx 59*9880d681SAndroid Build Coastguard Worker; CHECK: orq [[INCHI]], %rcx 60*9880d681SAndroid Build Coastguard Worker; CHECK: lock 61*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 62*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 63*9880d681SAndroid Build Coastguard Worker 64*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, _var 65*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, _var+8 66*9880d681SAndroid Build Coastguard Worker 67*9880d681SAndroid Build Coastguard Worker %val = atomicrmw or i128* %p, i128 %bits seq_cst 68*9880d681SAndroid Build Coastguard Worker store i128 %val, i128* @var, align 16 69*9880d681SAndroid Build Coastguard Worker ret void 70*9880d681SAndroid Build Coastguard Worker} 71*9880d681SAndroid Build Coastguard Worker 72*9880d681SAndroid Build Coastguard Workerdefine void @fetch_and_add(i128* %p, i128 %bits) { 73*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fetch_and_add: 74*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq %rdx, [[INCHI:%[a-z0-9]+]] 75*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq (%rdi), %rax 76*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq 8(%rdi), %rdx 77*9880d681SAndroid Build Coastguard Worker 78*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 79*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, %rbx 80*9880d681SAndroid Build Coastguard Worker ; INCLO equivalent comes in in %rsi, so it makes sense it stays there. 81*9880d681SAndroid Build Coastguard Worker; CHECK: addq %rsi, %rbx 82*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, %rcx 83*9880d681SAndroid Build Coastguard Worker; CHECK: adcq [[INCHI]], %rcx 84*9880d681SAndroid Build Coastguard Worker; CHECK: lock 85*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 86*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 87*9880d681SAndroid Build Coastguard Worker 88*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, _var 89*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, _var+8 90*9880d681SAndroid Build Coastguard Worker 91*9880d681SAndroid Build Coastguard Worker %val = atomicrmw add i128* %p, i128 %bits seq_cst 92*9880d681SAndroid Build Coastguard Worker store i128 %val, i128* @var, align 16 93*9880d681SAndroid Build Coastguard Worker ret void 94*9880d681SAndroid Build Coastguard Worker} 95*9880d681SAndroid Build Coastguard Worker 96*9880d681SAndroid Build Coastguard Workerdefine void @fetch_and_sub(i128* %p, i128 %bits) { 97*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fetch_and_sub: 98*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq %rdx, [[INCHI:%[a-z0-9]+]] 99*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq (%rdi), %rax 100*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq 8(%rdi), %rdx 101*9880d681SAndroid Build Coastguard Worker 102*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 103*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, %rbx 104*9880d681SAndroid Build Coastguard Worker ; INCLO equivalent comes in in %rsi, so it makes sense it stays there. 105*9880d681SAndroid Build Coastguard Worker; CHECK: subq %rsi, %rbx 106*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, %rcx 107*9880d681SAndroid Build Coastguard Worker; CHECK: sbbq [[INCHI]], %rcx 108*9880d681SAndroid Build Coastguard Worker; CHECK: lock 109*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 110*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 111*9880d681SAndroid Build Coastguard Worker 112*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, _var 113*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, _var+8 114*9880d681SAndroid Build Coastguard Worker 115*9880d681SAndroid Build Coastguard Worker %val = atomicrmw sub i128* %p, i128 %bits seq_cst 116*9880d681SAndroid Build Coastguard Worker store i128 %val, i128* @var, align 16 117*9880d681SAndroid Build Coastguard Worker ret void 118*9880d681SAndroid Build Coastguard Worker} 119*9880d681SAndroid Build Coastguard Worker 120*9880d681SAndroid Build Coastguard Workerdefine void @fetch_and_min(i128* %p, i128 %bits) { 121*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fetch_and_min: 122*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq %rdx, [[INCHI:%[a-z0-9]+]] 123*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq (%rdi), %rax 124*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq 8(%rdi), %rdx 125*9880d681SAndroid Build Coastguard Worker 126*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 127*9880d681SAndroid Build Coastguard Worker; CHECK: cmpq 128*9880d681SAndroid Build Coastguard Worker; CHECK: sbbq 129*9880d681SAndroid Build Coastguard Worker; CHECK: setg 130*9880d681SAndroid Build Coastguard Worker; CHECK: cmovneq %rax, %rbx 131*9880d681SAndroid Build Coastguard Worker; CHECK: movq [[INCHI]], %rcx 132*9880d681SAndroid Build Coastguard Worker; CHECK: cmovneq %rdx, %rcx 133*9880d681SAndroid Build Coastguard Worker; CHECK: lock 134*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 135*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 136*9880d681SAndroid Build Coastguard Worker 137*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, _var 138*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, _var+8 139*9880d681SAndroid Build Coastguard Worker 140*9880d681SAndroid Build Coastguard Worker %val = atomicrmw min i128* %p, i128 %bits seq_cst 141*9880d681SAndroid Build Coastguard Worker store i128 %val, i128* @var, align 16 142*9880d681SAndroid Build Coastguard Worker ret void 143*9880d681SAndroid Build Coastguard Worker} 144*9880d681SAndroid Build Coastguard Worker 145*9880d681SAndroid Build Coastguard Workerdefine void @fetch_and_max(i128* %p, i128 %bits) { 146*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fetch_and_max: 147*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq %rdx, [[INCHI:%[a-z0-9]+]] 148*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq (%rdi), %rax 149*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq 8(%rdi), %rdx 150*9880d681SAndroid Build Coastguard Worker 151*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 152*9880d681SAndroid Build Coastguard Worker; CHECK: cmpq 153*9880d681SAndroid Build Coastguard Worker; CHECK: sbbq 154*9880d681SAndroid Build Coastguard Worker; CHECK: setge 155*9880d681SAndroid Build Coastguard Worker; CHECK: cmovneq %rax, %rbx 156*9880d681SAndroid Build Coastguard Worker; CHECK: movq [[INCHI]], %rcx 157*9880d681SAndroid Build Coastguard Worker; CHECK: cmovneq %rdx, %rcx 158*9880d681SAndroid Build Coastguard Worker; CHECK: lock 159*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 160*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 161*9880d681SAndroid Build Coastguard Worker 162*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, _var 163*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, _var+8 164*9880d681SAndroid Build Coastguard Worker 165*9880d681SAndroid Build Coastguard Worker %val = atomicrmw max i128* %p, i128 %bits seq_cst 166*9880d681SAndroid Build Coastguard Worker store i128 %val, i128* @var, align 16 167*9880d681SAndroid Build Coastguard Worker ret void 168*9880d681SAndroid Build Coastguard Worker} 169*9880d681SAndroid Build Coastguard Worker 170*9880d681SAndroid Build Coastguard Workerdefine void @fetch_and_umin(i128* %p, i128 %bits) { 171*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fetch_and_umin: 172*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq %rdx, [[INCHI:%[a-z0-9]+]] 173*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq (%rdi), %rax 174*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq 8(%rdi), %rdx 175*9880d681SAndroid Build Coastguard Worker 176*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 177*9880d681SAndroid Build Coastguard Worker; CHECK: cmpq 178*9880d681SAndroid Build Coastguard Worker; CHECK: sbbq 179*9880d681SAndroid Build Coastguard Worker; CHECK: seta 180*9880d681SAndroid Build Coastguard Worker; CHECK: cmovneq %rax, %rbx 181*9880d681SAndroid Build Coastguard Worker; CHECK: movq [[INCHI]], %rcx 182*9880d681SAndroid Build Coastguard Worker; CHECK: cmovneq %rdx, %rcx 183*9880d681SAndroid Build Coastguard Worker; CHECK: lock 184*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 185*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 186*9880d681SAndroid Build Coastguard Worker 187*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, _var 188*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, _var+8 189*9880d681SAndroid Build Coastguard Worker 190*9880d681SAndroid Build Coastguard Worker %val = atomicrmw umin i128* %p, i128 %bits seq_cst 191*9880d681SAndroid Build Coastguard Worker store i128 %val, i128* @var, align 16 192*9880d681SAndroid Build Coastguard Worker ret void 193*9880d681SAndroid Build Coastguard Worker} 194*9880d681SAndroid Build Coastguard Worker 195*9880d681SAndroid Build Coastguard Workerdefine void @fetch_and_umax(i128* %p, i128 %bits) { 196*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: fetch_and_umax: 197*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq %rdx, [[INCHI:%[a-z0-9]+]] 198*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq (%rdi), %rax 199*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: movq 8(%rdi), %rdx 200*9880d681SAndroid Build Coastguard Worker 201*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 202*9880d681SAndroid Build Coastguard Worker; CHECK: cmpq 203*9880d681SAndroid Build Coastguard Worker; CHECK: sbbq 204*9880d681SAndroid Build Coastguard Worker; CHECK: setb 205*9880d681SAndroid Build Coastguard Worker; CHECK: cmovneq %rax, %rbx 206*9880d681SAndroid Build Coastguard Worker; CHECK: movq [[INCHI]], %rcx 207*9880d681SAndroid Build Coastguard Worker; CHECK: cmovneq %rdx, %rcx 208*9880d681SAndroid Build Coastguard Worker; CHECK: lock 209*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 210*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 211*9880d681SAndroid Build Coastguard Worker 212*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rax, _var 213*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, _var+8 214*9880d681SAndroid Build Coastguard Worker 215*9880d681SAndroid Build Coastguard Worker %val = atomicrmw umax i128* %p, i128 %bits seq_cst 216*9880d681SAndroid Build Coastguard Worker store i128 %val, i128* @var, align 16 217*9880d681SAndroid Build Coastguard Worker ret void 218*9880d681SAndroid Build Coastguard Worker} 219*9880d681SAndroid Build Coastguard Worker 220*9880d681SAndroid Build Coastguard Workerdefine i128 @atomic_load_seq_cst(i128* %p) { 221*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: atomic_load_seq_cst: 222*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %eax, %eax 223*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %edx, %edx 224*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %ecx, %ecx 225*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %ebx, %ebx 226*9880d681SAndroid Build Coastguard Worker; CHECK: lock 227*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 228*9880d681SAndroid Build Coastguard Worker 229*9880d681SAndroid Build Coastguard Worker %r = load atomic i128, i128* %p seq_cst, align 16 230*9880d681SAndroid Build Coastguard Worker ret i128 %r 231*9880d681SAndroid Build Coastguard Worker} 232*9880d681SAndroid Build Coastguard Worker 233*9880d681SAndroid Build Coastguard Workerdefine i128 @atomic_load_relaxed(i128* %p) { 234*9880d681SAndroid Build Coastguard Worker; CHECK: atomic_load_relaxed: 235*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %eax, %eax 236*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %edx, %edx 237*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %ecx, %ecx 238*9880d681SAndroid Build Coastguard Worker; CHECK: xorl %ebx, %ebx 239*9880d681SAndroid Build Coastguard Worker; CHECK: lock 240*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 241*9880d681SAndroid Build Coastguard Worker 242*9880d681SAndroid Build Coastguard Worker %r = load atomic i128, i128* %p monotonic, align 16 243*9880d681SAndroid Build Coastguard Worker ret i128 %r 244*9880d681SAndroid Build Coastguard Worker} 245*9880d681SAndroid Build Coastguard Worker 246*9880d681SAndroid Build Coastguard Workerdefine void @atomic_store_seq_cst(i128* %p, i128 %in) { 247*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: atomic_store_seq_cst: 248*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, %rcx 249*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rsi, %rbx 250*9880d681SAndroid Build Coastguard Worker; CHECK: movq (%rdi), %rax 251*9880d681SAndroid Build Coastguard Worker; CHECK: movq 8(%rdi), %rdx 252*9880d681SAndroid Build Coastguard Worker 253*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 254*9880d681SAndroid Build Coastguard Worker; CHECK: lock 255*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 256*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 257*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: callq ___sync_lock_test_and_set_16 258*9880d681SAndroid Build Coastguard Worker 259*9880d681SAndroid Build Coastguard Worker store atomic i128 %in, i128* %p seq_cst, align 16 260*9880d681SAndroid Build Coastguard Worker ret void 261*9880d681SAndroid Build Coastguard Worker} 262*9880d681SAndroid Build Coastguard Worker 263*9880d681SAndroid Build Coastguard Workerdefine void @atomic_store_release(i128* %p, i128 %in) { 264*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: atomic_store_release: 265*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, %rcx 266*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rsi, %rbx 267*9880d681SAndroid Build Coastguard Worker; CHECK: movq (%rdi), %rax 268*9880d681SAndroid Build Coastguard Worker; CHECK: movq 8(%rdi), %rdx 269*9880d681SAndroid Build Coastguard Worker 270*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 271*9880d681SAndroid Build Coastguard Worker; CHECK: lock 272*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 273*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 274*9880d681SAndroid Build Coastguard Worker 275*9880d681SAndroid Build Coastguard Worker store atomic i128 %in, i128* %p release, align 16 276*9880d681SAndroid Build Coastguard Worker ret void 277*9880d681SAndroid Build Coastguard Worker} 278*9880d681SAndroid Build Coastguard Worker 279*9880d681SAndroid Build Coastguard Workerdefine void @atomic_store_relaxed(i128* %p, i128 %in) { 280*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: atomic_store_relaxed: 281*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rdx, %rcx 282*9880d681SAndroid Build Coastguard Worker; CHECK: movq %rsi, %rbx 283*9880d681SAndroid Build Coastguard Worker; CHECK: movq (%rdi), %rax 284*9880d681SAndroid Build Coastguard Worker; CHECK: movq 8(%rdi), %rdx 285*9880d681SAndroid Build Coastguard Worker 286*9880d681SAndroid Build Coastguard Worker; CHECK: [[LOOP:.?LBB[0-9]+_[0-9]+]]: 287*9880d681SAndroid Build Coastguard Worker; CHECK: lock 288*9880d681SAndroid Build Coastguard Worker; CHECK: cmpxchg16b (%rdi) 289*9880d681SAndroid Build Coastguard Worker; CHECK: jne [[LOOP]] 290*9880d681SAndroid Build Coastguard Worker 291*9880d681SAndroid Build Coastguard Worker store atomic i128 %in, i128* %p unordered, align 16 292*9880d681SAndroid Build Coastguard Worker ret void 293*9880d681SAndroid Build Coastguard Worker} 294