Skip to content

Commit 1fe5a99

Browse files
committed
[X86] Pre-commit i64 volatile test case for D60156. NFC
llvm-svn: 358210
1 parent 1740c6e commit 1fe5a99

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,35 @@ define i64 @test3(i64* %ptr) noimplicitfloat {
9090
%val = load atomic i64, i64* %ptr seq_cst, align 8
9191
ret i64 %val
9292
}
93+
94+
define i64 @test4(i64* %ptr) {
95+
; SSE42-LABEL: test4:
96+
; SSE42: # %bb.0:
97+
; SSE42-NEXT: movl {{[0-9]+}}(%esp), %eax
98+
; SSE42-NEXT: movq {{.*#+}} xmm0 = mem[0],zero
99+
; SSE42-NEXT: movd %xmm0, %eax
100+
; SSE42-NEXT: pextrd $1, %xmm0, %edx
101+
; SSE42-NEXT: retl
102+
;
103+
; NOSSE-LABEL: test4:
104+
; NOSSE: # %bb.0:
105+
; NOSSE-NEXT: pushl %ebx
106+
; NOSSE-NEXT: .cfi_def_cfa_offset 8
107+
; NOSSE-NEXT: pushl %esi
108+
; NOSSE-NEXT: .cfi_def_cfa_offset 12
109+
; NOSSE-NEXT: .cfi_offset %esi, -12
110+
; NOSSE-NEXT: .cfi_offset %ebx, -8
111+
; NOSSE-NEXT: movl {{[0-9]+}}(%esp), %esi
112+
; NOSSE-NEXT: xorl %eax, %eax
113+
; NOSSE-NEXT: xorl %edx, %edx
114+
; NOSSE-NEXT: xorl %ecx, %ecx
115+
; NOSSE-NEXT: xorl %ebx, %ebx
116+
; NOSSE-NEXT: lock cmpxchg8b (%esi)
117+
; NOSSE-NEXT: popl %esi
118+
; NOSSE-NEXT: .cfi_def_cfa_offset 8
119+
; NOSSE-NEXT: popl %ebx
120+
; NOSSE-NEXT: .cfi_def_cfa_offset 4
121+
; NOSSE-NEXT: retl
122+
%val = load atomic volatile i64, i64* %ptr seq_cst, align 8
123+
ret i64 %val
124+
}

0 commit comments

Comments
 (0)