]> granicus.if.org Git - llvm/commitdiff
[X86] Pre-commit i64 volatile test case for D60156. NFC
authorCraig Topper <craig.topper@intel.com>
Thu, 11 Apr 2019 18:40:08 +0000 (18:40 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 11 Apr 2019 18:40:08 +0000 (18:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358210 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/atomic-load-store-wide.ll

index 2841b8ca344040277aaccc5ad9d2f4205a387ed5..d1b280661a3f9e7d3238fe79a8950db50f776558 100644 (file)
@@ -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
+}