From: Craig Topper Date: Thu, 11 Apr 2019 18:40:08 +0000 (+0000) Subject: [X86] Pre-commit i64 volatile test case for D60156. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f509674afe68aff3b53eae16244c854c8b049ea1;p=llvm [X86] Pre-commit i64 volatile test case for D60156. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358210 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/atomic-load-store-wide.ll b/test/CodeGen/X86/atomic-load-store-wide.ll index 2841b8ca344..d1b280661a3 100644 --- a/test/CodeGen/X86/atomic-load-store-wide.ll +++ b/test/CodeGen/X86/atomic-load-store-wide.ll @@ -90,3 +90,35 @@ define i64 @test3(i64* %ptr) noimplicitfloat { %val = load atomic i64, i64* %ptr seq_cst, align 8 ret i64 %val } + +define i64 @test4(i64* %ptr) { +; SSE42-LABEL: test4: +; SSE42: # %bb.0: +; SSE42-NEXT: movl {{[0-9]+}}(%esp), %eax +; SSE42-NEXT: movq {{.*#+}} xmm0 = mem[0],zero +; SSE42-NEXT: movd %xmm0, %eax +; SSE42-NEXT: pextrd $1, %xmm0, %edx +; SSE42-NEXT: retl +; +; NOSSE-LABEL: test4: +; NOSSE: # %bb.0: +; NOSSE-NEXT: pushl %ebx +; NOSSE-NEXT: .cfi_def_cfa_offset 8 +; NOSSE-NEXT: pushl %esi +; NOSSE-NEXT: .cfi_def_cfa_offset 12 +; NOSSE-NEXT: .cfi_offset %esi, -12 +; NOSSE-NEXT: .cfi_offset %ebx, -8 +; NOSSE-NEXT: movl {{[0-9]+}}(%esp), %esi +; NOSSE-NEXT: xorl %eax, %eax +; NOSSE-NEXT: xorl %edx, %edx +; NOSSE-NEXT: xorl %ecx, %ecx +; NOSSE-NEXT: xorl %ebx, %ebx +; NOSSE-NEXT: lock cmpxchg8b (%esi) +; NOSSE-NEXT: popl %esi +; NOSSE-NEXT: .cfi_def_cfa_offset 8 +; NOSSE-NEXT: popl %ebx +; NOSSE-NEXT: .cfi_def_cfa_offset 4 +; NOSSE-NEXT: retl + %val = load atomic volatile i64, i64* %ptr seq_cst, align 8 + ret i64 %val +}