1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-apple-macosx10.9 -verify-machineinstrs -mattr=cx16 | FileCheck %s 3; RUN: llc < %s -mtriple=x86_64-apple-macosx10.9 -verify-machineinstrs -mattr=cx16 -mattr=-sse | FileCheck %s --check-prefix=NOSSE 4 5; FIXME: This test has a fatal error in 32-bit mode 6 7@fsc128 = external global fp128 8 9define void @atomic_fetch_swapf128(fp128 %x) nounwind { 10; CHECK-LABEL: atomic_fetch_swapf128: 11; CHECK: ## %bb.0: 12; CHECK-NEXT: pushq %rbx 13; CHECK-NEXT: movq _fsc128@{{.*}}(%rip), %rsi 14; CHECK-NEXT: movaps (%rsi), %xmm1 15; CHECK-NEXT: .p2align 4, 0x90 16; CHECK-NEXT: LBB0_1: ## %atomicrmw.start 17; CHECK-NEXT: ## =>This Inner Loop Header: Depth=1 18; CHECK-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp) 19; CHECK-NEXT: movq -{{[0-9]+}}(%rsp), %rbx 20; CHECK-NEXT: movq -{{[0-9]+}}(%rsp), %rcx 21; CHECK-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp) 22; CHECK-NEXT: movq -{{[0-9]+}}(%rsp), %rax 23; CHECK-NEXT: movq -{{[0-9]+}}(%rsp), %rdx 24; CHECK-NEXT: lock cmpxchg16b (%rsi) 25; CHECK-NEXT: movq %rdx, -{{[0-9]+}}(%rsp) 26; CHECK-NEXT: movq %rax, -{{[0-9]+}}(%rsp) 27; CHECK-NEXT: movaps -{{[0-9]+}}(%rsp), %xmm1 28; CHECK-NEXT: jne LBB0_1 29; CHECK-NEXT: ## %bb.2: ## %atomicrmw.end 30; CHECK-NEXT: popq %rbx 31; CHECK-NEXT: retq 32; 33; NOSSE-LABEL: atomic_fetch_swapf128: 34; NOSSE: ## %bb.0: 35; NOSSE-NEXT: pushq %rbx 36; NOSSE-NEXT: movq %rsi, %rcx 37; NOSSE-NEXT: movq %rdi, %rbx 38; NOSSE-NEXT: movq _fsc128@{{.*}}(%rip), %rsi 39; NOSSE-NEXT: movq (%rsi), %rax 40; NOSSE-NEXT: movq 8(%rsi), %rdx 41; NOSSE-NEXT: .p2align 4, 0x90 42; NOSSE-NEXT: LBB0_1: ## %atomicrmw.start 43; NOSSE-NEXT: ## =>This Inner Loop Header: Depth=1 44; NOSSE-NEXT: lock cmpxchg16b (%rsi) 45; NOSSE-NEXT: jne LBB0_1 46; NOSSE-NEXT: ## %bb.2: ## %atomicrmw.end 47; NOSSE-NEXT: popq %rbx 48; NOSSE-NEXT: retq 49 %t1 = atomicrmw xchg fp128* @fsc128, fp128 %x acquire 50 ret void 51} 52