diff options
| author | Craig Topper <craig.topper@intel.com> | 2017-12-26 22:22:57 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2017-12-26 22:22:57 +0000 |
| commit | 8d8a7da7450ca9ab9a4e0ea529dd6b720d0b0d56 (patch) | |
| tree | dad7d529569e17a7c1079540648a545e6359ff97 | |
| parent | 14adbacd8ad5a39db30deb09ed4904f5aa83e6e4 (diff) | |
| download | bcm5719-llvm-8d8a7da7450ca9ab9a4e0ea529dd6b720d0b0d56.tar.gz bcm5719-llvm-8d8a7da7450ca9ab9a4e0ea529dd6b720d0b0d56.zip | |
[X86] Regenerate test using update_llc_test_checks.py.
llvm-svn: 321462
| -rw-r--r-- | llvm/test/CodeGen/X86/gather-addresses.ll | 162 |
1 files changed, 128 insertions, 34 deletions
diff --git a/llvm/test/CodeGen/X86/gather-addresses.ll b/llvm/test/CodeGen/X86/gather-addresses.ll index e09ad3e4e0b..6431847064f 100644 --- a/llvm/test/CodeGen/X86/gather-addresses.ll +++ b/llvm/test/CodeGen/X86/gather-addresses.ll @@ -1,3 +1,4 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; RUN: llc -mtriple=x86_64-linux -mcpu=nehalem < %s | FileCheck %s --check-prefix=LIN ; RUN: llc -mtriple=x86_64-win32 -mcpu=nehalem < %s | FileCheck %s --check-prefix=WIN ; RUN: llc -mtriple=i686-win32 -mcpu=nehalem < %s | FileCheck %s --check-prefix=LIN32 @@ -7,34 +8,59 @@ ; use an efficient mov/shift sequence rather than shuffling each individual ; element out of the index vector. -; CHECK-LABEL: foo: -; LIN: movdqa (%rsi), %xmm0 -; LIN: pand (%rdx), %xmm0 -; LIN: pextrq $1, %xmm0, %r[[REG4:.+]] -; LIN: movq %xmm0, %r[[REG2:.+]] -; LIN: movslq %e[[REG2]], %r[[REG1:.+]] -; LIN: sarq $32, %r[[REG2]] -; LIN: movslq %e[[REG4]], %r[[REG3:.+]] -; LIN: sarq $32, %r[[REG4]] -; LIN: movsd (%rdi,%r[[REG3]],8), %xmm1 -; LIN: movhpd (%rdi,%r[[REG4]],8), %xmm1 -; LIN: movq %rdi, %xmm1 -; LIN: movq %r[[REG3]], %xmm0 - -; WIN: movdqa (%rdx), %xmm0 -; WIN: pand (%r8), %xmm0 -; WIN: pextrq $1, %xmm0, %r[[REG4:.+]] -; WIN: movq %xmm0, %r[[REG2:.+]] -; WIN: movslq %e[[REG2]], %r[[REG1:.+]] -; WIN: sarq $32, %r[[REG2]] -; WIN: movslq %e[[REG4]], %r[[REG3:.+]] -; WIN: sarq $32, %r[[REG4]] -; WIN: movsd (%rcx,%r[[REG3]],8), %xmm1 -; WIN: movhpd (%rcx,%r[[REG4]],8), %xmm1 -; WIN: movdqa (%r[[REG2]]), %xmm0 -; WIN: movq %r[[REG2]], %xmm1 - define <4 x double> @foo(double* %p, <4 x i32>* %i, <4 x i32>* %h) nounwind { +; LIN-LABEL: foo: +; LIN: # %bb.0: +; LIN-NEXT: movdqa (%rsi), %xmm0 +; LIN-NEXT: pand (%rdx), %xmm0 +; LIN-NEXT: pextrq $1, %xmm0, %rax +; LIN-NEXT: movq %xmm0, %rcx +; LIN-NEXT: movslq %ecx, %rdx +; LIN-NEXT: sarq $32, %rcx +; LIN-NEXT: movslq %eax, %rsi +; LIN-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero +; LIN-NEXT: movhpd {{.*#+}} xmm0 = xmm0[0],mem[0] +; LIN-NEXT: sarq $32, %rax +; LIN-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero +; LIN-NEXT: movhpd {{.*#+}} xmm1 = xmm1[0],mem[0] +; LIN-NEXT: retq +; +; WIN-LABEL: foo: +; WIN: # %bb.0: +; WIN-NEXT: movdqa (%rdx), %xmm0 +; WIN-NEXT: pand (%r8), %xmm0 +; WIN-NEXT: pextrq $1, %xmm0, %rax +; WIN-NEXT: movq %xmm0, %rdx +; WIN-NEXT: movslq %edx, %r8 +; WIN-NEXT: sarq $32, %rdx +; WIN-NEXT: movslq %eax, %r9 +; WIN-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero +; WIN-NEXT: movhpd {{.*#+}} xmm0 = xmm0[0],mem[0] +; WIN-NEXT: sarq $32, %rax +; WIN-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero +; WIN-NEXT: movhpd {{.*#+}} xmm1 = xmm1[0],mem[0] +; WIN-NEXT: retq +; +; LIN32-LABEL: foo: +; LIN32: # %bb.0: +; LIN32-NEXT: pushl %edi +; LIN32-NEXT: pushl %esi +; LIN32-NEXT: movl {{[0-9]+}}(%esp), %eax +; LIN32-NEXT: movl {{[0-9]+}}(%esp), %ecx +; LIN32-NEXT: movl {{[0-9]+}}(%esp), %edx +; LIN32-NEXT: movdqa (%edx), %xmm0 +; LIN32-NEXT: pand (%ecx), %xmm0 +; LIN32-NEXT: pextrd $1, %xmm0, %ecx +; LIN32-NEXT: pextrd $2, %xmm0, %edx +; LIN32-NEXT: pextrd $3, %xmm0, %esi +; LIN32-NEXT: movd %xmm0, %edi +; LIN32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero +; LIN32-NEXT: movhpd {{.*#+}} xmm0 = xmm0[0],mem[0] +; LIN32-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero +; LIN32-NEXT: movhpd {{.*#+}} xmm1 = xmm1[0],mem[0] +; LIN32-NEXT: popl %esi +; LIN32-NEXT: popl %edi +; LIN32-NEXT: retl %a = load <4 x i32>, <4 x i32>* %i %b = load <4 x i32>, <4 x i32>* %h %j = and <4 x i32> %a, %b @@ -60,13 +86,81 @@ define <4 x double> @foo(double* %p, <4 x i32>* %i, <4 x i32>* %h) nounwind { ; Check that the sequence previously used above, which bounces the vector off the ; cache works for x86-32. Note that in this case it will not be used for index ; calculation, since indexes are 32-bit, not 64. -; CHECK-LABEL: old: -; LIN32: movaps %xmm0, (%esp) -; LIN32-DAG: {{(mov|and)}}l (%esp), -; LIN32-DAG: {{(mov|and)}}l 4(%esp), -; LIN32-DAG: {{(mov|and)}}l 8(%esp), -; LIN32-DAG: {{(mov|and)}}l 12(%esp), define <4 x i64> @old(double* %p, <4 x i32>* %i, <4 x i32>* %h, i64 %f) nounwind { +; LIN-LABEL: old: +; LIN: # %bb.0: +; LIN-NEXT: movdqa (%rsi), %xmm0 +; LIN-NEXT: pand (%rdx), %xmm0 +; LIN-NEXT: pextrq $1, %xmm0, %rax +; LIN-NEXT: movq %rax, %rdx +; LIN-NEXT: shrq $32, %rdx +; LIN-NEXT: movq %xmm0, %rsi +; LIN-NEXT: movq %rsi, %rdi +; LIN-NEXT: shrq $32, %rdi +; LIN-NEXT: andl %ecx, %esi +; LIN-NEXT: andl %ecx, %eax +; LIN-NEXT: andq %rcx, %rdi +; LIN-NEXT: andq %rcx, %rdx +; LIN-NEXT: movq %rdi, %xmm1 +; LIN-NEXT: movq %rsi, %xmm0 +; LIN-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0] +; LIN-NEXT: movq %rdx, %xmm2 +; LIN-NEXT: movq %rax, %xmm1 +; LIN-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0] +; LIN-NEXT: retq +; +; WIN-LABEL: old: +; WIN: # %bb.0: +; WIN-NEXT: movdqa (%rdx), %xmm0 +; WIN-NEXT: pand (%r8), %xmm0 +; WIN-NEXT: pextrq $1, %xmm0, %r8 +; WIN-NEXT: movq %r8, %rcx +; WIN-NEXT: shrq $32, %rcx +; WIN-NEXT: movq %xmm0, %rax +; WIN-NEXT: movq %rax, %rdx +; WIN-NEXT: shrq $32, %rdx +; WIN-NEXT: andl %r9d, %eax +; WIN-NEXT: andl %r9d, %r8d +; WIN-NEXT: andq %r9, %rdx +; WIN-NEXT: andq %r9, %rcx +; WIN-NEXT: movq %rdx, %xmm1 +; WIN-NEXT: movq %rax, %xmm0 +; WIN-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0] +; WIN-NEXT: movq %rcx, %xmm2 +; WIN-NEXT: movq %r8, %xmm1 +; WIN-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0] +; WIN-NEXT: retq +; +; LIN32-LABEL: old: +; LIN32: # %bb.0: +; LIN32-NEXT: pushl %ebp +; LIN32-NEXT: movl %esp, %ebp +; LIN32-NEXT: pushl %esi +; LIN32-NEXT: andl $-16, %esp +; LIN32-NEXT: subl $32, %esp +; LIN32-NEXT: movl 20(%ebp), %eax +; LIN32-NEXT: movl 16(%ebp), %ecx +; LIN32-NEXT: movl 12(%ebp), %edx +; LIN32-NEXT: movaps (%edx), %xmm0 +; LIN32-NEXT: andps (%ecx), %xmm0 +; LIN32-NEXT: movaps %xmm0, (%esp) +; LIN32-NEXT: movl (%esp), %ecx +; LIN32-NEXT: andl %eax, %ecx +; LIN32-NEXT: movl {{[0-9]+}}(%esp), %edx +; LIN32-NEXT: andl %eax, %edx +; LIN32-NEXT: movl {{[0-9]+}}(%esp), %esi +; LIN32-NEXT: andl %eax, %esi +; LIN32-NEXT: andl {{[0-9]+}}(%esp), %eax +; LIN32-NEXT: movd %edx, %xmm1 +; LIN32-NEXT: movd %ecx, %xmm0 +; LIN32-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0] +; LIN32-NEXT: movd %eax, %xmm2 +; LIN32-NEXT: movd %esi, %xmm1 +; LIN32-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0] +; LIN32-NEXT: leal -4(%ebp), %esp +; LIN32-NEXT: popl %esi +; LIN32-NEXT: popl %ebp +; LIN32-NEXT: retl %a = load <4 x i32>, <4 x i32>* %i %b = load <4 x i32>, <4 x i32>* %h %j = and <4 x i32> %a, %b @@ -77,7 +171,7 @@ define <4 x i64> @old(double* %p, <4 x i32>* %i, <4 x i32>* %h, i64 %f) nounwind %q0 = zext i32 %d0 to i64 %q1 = zext i32 %d1 to i64 %q2 = zext i32 %d2 to i64 - %q3 = zext i32 %d3 to i64 + %q3 = zext i32 %d3 to i64 %r0 = and i64 %q0, %f %r1 = and i64 %q1, %f %r2 = and i64 %q2, %f |

