forked from OSchip/llvm-project
1587 lines
56 KiB
LLVM
1587 lines
56 KiB
LLVM
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=SSE --check-prefix=SSE2
|
||
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefix=SSE --check-prefix=SSE41
|
||
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=AVX --check-prefix=AVX1
|
||
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefix=AVX --check-prefix=AVX2
|
||
|
|
||
|
;
|
||
|
; sdiv by 7
|
||
|
;
|
||
|
|
||
|
define <2 x i64> @test_div7_2i64(<2 x i64> %a) nounwind {
|
||
|
; SSE2-LABEL: test_div7_2i64:
|
||
|
; SSE2: # BB#0:
|
||
|
; SSE2-NEXT: movd %xmm0, %rax
|
||
|
; SSE2-NEXT: movabsq $5270498306774157605, %rcx # imm = 0x4924924924924925
|
||
|
; SSE2-NEXT: imulq %rcx
|
||
|
; SSE2-NEXT: movq %rdx, %rax
|
||
|
; SSE2-NEXT: shrq $63, %rax
|
||
|
; SSE2-NEXT: sarq %rdx
|
||
|
; SSE2-NEXT: addq %rax, %rdx
|
||
|
; SSE2-NEXT: movd %rdx, %xmm1
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
|
||
|
; SSE2-NEXT: movd %xmm0, %rax
|
||
|
; SSE2-NEXT: imulq %rcx
|
||
|
; SSE2-NEXT: movq %rdx, %rax
|
||
|
; SSE2-NEXT: shrq $63, %rax
|
||
|
; SSE2-NEXT: sarq %rdx
|
||
|
; SSE2-NEXT: addq %rax, %rdx
|
||
|
; SSE2-NEXT: movd %rdx, %xmm0
|
||
|
; SSE2-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
|
||
|
; SSE2-NEXT: movdqa %xmm1, %xmm0
|
||
|
; SSE2-NEXT: retq
|
||
|
;
|
||
|
; SSE41-LABEL: test_div7_2i64:
|
||
|
; SSE41: # BB#0:
|
||
|
; SSE41-NEXT: pextrq $1, %xmm0, %rax
|
||
|
; SSE41-NEXT: movabsq $5270498306774157605, %rcx # imm = 0x4924924924924925
|
||
|
; SSE41-NEXT: imulq %rcx
|
||
|
; SSE41-NEXT: movq %rdx, %rax
|
||
|
; SSE41-NEXT: shrq $63, %rax
|
||
|
; SSE41-NEXT: sarq %rdx
|
||
|
; SSE41-NEXT: addq %rax, %rdx
|
||
|
; SSE41-NEXT: movd %rdx, %xmm1
|
||
|
; SSE41-NEXT: movd %xmm0, %rax
|
||
|
; SSE41-NEXT: imulq %rcx
|
||
|
; SSE41-NEXT: movq %rdx, %rax
|
||
|
; SSE41-NEXT: shrq $63, %rax
|
||
|
; SSE41-NEXT: sarq %rdx
|
||
|
; SSE41-NEXT: addq %rax, %rdx
|
||
|
; SSE41-NEXT: movd %rdx, %xmm0
|
||
|
; SSE41-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
||
|
; SSE41-NEXT: retq
|
||
|
;
|
||
|
; AVX-LABEL: test_div7_2i64:
|
||
|
; AVX: # BB#0:
|
||
|
; AVX-NEXT: vpextrq $1, %xmm0, %rax
|
||
|
; AVX-NEXT: movabsq $5270498306774157605, %rcx # imm = 0x4924924924924925
|
||
|
; AVX-NEXT: imulq %rcx
|
||
|
; AVX-NEXT: movq %rdx, %rax
|
||
|
; AVX-NEXT: shrq $63, %rax
|
||
|
; AVX-NEXT: sarq %rdx
|
||
|
; AVX-NEXT: addq %rax, %rdx
|
||
|
; AVX-NEXT: vmovq %rdx, %xmm1
|
||
|
; AVX-NEXT: vmovq %xmm0, %rax
|
||
|
; AVX-NEXT: imulq %rcx
|
||
|
; AVX-NEXT: movq %rdx, %rax
|
||
|
; AVX-NEXT: shrq $63, %rax
|
||
|
; AVX-NEXT: sarq %rdx
|
||
|
; AVX-NEXT: addq %rax, %rdx
|
||
|
; AVX-NEXT: vmovq %rdx, %xmm0
|
||
|
; AVX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
||
|
; AVX-NEXT: retq
|
||
|
%res = sdiv <2 x i64> %a, <i64 7, i64 7>
|
||
|
ret <2 x i64> %res
|
||
|
}
|
||
|
|
||
|
define <4 x i32> @test_div7_4i32(<4 x i32> %a) nounwind {
|
||
|
; SSE2-LABEL: test_div7_4i32:
|
||
|
; SSE2: # BB#0:
|
||
|
; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2454267027,2454267027,2454267027,2454267027]
|
||
|
; SSE2-NEXT: movdqa %xmm0, %xmm2
|
||
|
; SSE2-NEXT: psrad $31, %xmm2
|
||
|
; SSE2-NEXT: pand %xmm1, %xmm2
|
||
|
; SSE2-NEXT: movdqa %xmm0, %xmm3
|
||
|
; SSE2-NEXT: pmuludq %xmm1, %xmm3
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm1[1,1,3,3]
|
||
|
; SSE2-NEXT: psrad $31, %xmm1
|
||
|
; SSE2-NEXT: pand %xmm0, %xmm1
|
||
|
; SSE2-NEXT: paddd %xmm1, %xmm2
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm3[1,3,2,3]
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
|
||
|
; SSE2-NEXT: pmuludq %xmm4, %xmm3
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,3,2,3]
|
||
|
; SSE2-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
|
||
|
; SSE2-NEXT: psubd %xmm2, %xmm1
|
||
|
; SSE2-NEXT: paddd %xmm0, %xmm1
|
||
|
; SSE2-NEXT: movdqa %xmm1, %xmm0
|
||
|
; SSE2-NEXT: psrld $31, %xmm0
|
||
|
; SSE2-NEXT: psrad $2, %xmm1
|
||
|
; SSE2-NEXT: paddd %xmm0, %xmm1
|
||
|
; SSE2-NEXT: movdqa %xmm1, %xmm0
|
||
|
; SSE2-NEXT: retq
|
||
|
;
|
||
|
; SSE41-LABEL: test_div7_4i32:
|
||
|
; SSE41: # BB#0:
|
||
|
; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [2454267027,2454267027,2454267027,2454267027]
|
||
|
; SSE41-NEXT: pshufd {{.*#+}} xmm2 = xmm1[1,1,3,3]
|
||
|
; SSE41-NEXT: pshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
|
||
|
; SSE41-NEXT: pmuldq %xmm2, %xmm3
|
||
|
; SSE41-NEXT: pmuldq %xmm0, %xmm1
|
||
|
; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
|
||
|
; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm1[0,1],xmm3[2,3],xmm1[4,5],xmm3[6,7]
|
||
|
; SSE41-NEXT: paddd %xmm0, %xmm1
|
||
|
; SSE41-NEXT: movdqa %xmm1, %xmm0
|
||
|
; SSE41-NEXT: psrld $31, %xmm0
|
||
|
; SSE41-NEXT: psrad $2, %xmm1
|
||
|
; SSE41-NEXT: paddd %xmm0, %xmm1
|
||
|
; SSE41-NEXT: movdqa %xmm1, %xmm0
|
||
|
; SSE41-NEXT: retq
|
||
|
;
|
||
|
; AVX1-LABEL: test_div7_4i32:
|
||
|
; AVX1: # BB#0:
|
||
|
; AVX1-NEXT: vmovdqa {{.*#+}} xmm1 = [2454267027,2454267027,2454267027,2454267027]
|
||
|
; AVX1-NEXT: vpshufd {{.*#+}} xmm2 = xmm1[1,1,3,3]
|
||
|
; AVX1-NEXT: vpshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
|
||
|
; AVX1-NEXT: vpmuldq %xmm2, %xmm3, %xmm2
|
||
|
; AVX1-NEXT: vpmuldq %xmm1, %xmm0, %xmm1
|
||
|
; AVX1-NEXT: vpshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
|
||
|
; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
|
||
|
; AVX1-NEXT: vpaddd %xmm0, %xmm1, %xmm0
|
||
|
; AVX1-NEXT: vpsrld $31, %xmm0, %xmm1
|
||
|
; AVX1-NEXT: vpsrad $2, %xmm0, %xmm0
|
||
|
; AVX1-NEXT: vpaddd %xmm1, %xmm0, %xmm0
|
||
|
; AVX1-NEXT: retq
|
||
|
;
|
||
|
; AVX2-LABEL: test_div7_4i32:
|
||
|
; AVX2: # BB#0:
|
||
|
; AVX2-NEXT: vpbroadcastd {{.*}}(%rip), %xmm1
|
||
|
; AVX2-NEXT: vpshufd {{.*#+}} xmm2 = xmm1[1,1,3,3]
|
||
|
; AVX2-NEXT: vpshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
|
||
|
; AVX2-NEXT: vpmuldq %xmm2, %xmm3, %xmm2
|
||
|
; AVX2-NEXT: vpmuldq %xmm1, %xmm0, %xmm1
|
||
|
; AVX2-NEXT: vpshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
|
||
|
; AVX2-NEXT: vpblendd {{.*#+}} xmm1 = xmm1[0],xmm2[1],xmm1[2],xmm2[3]
|
||
|
; AVX2-NEXT: vpaddd %xmm0, %xmm1, %xmm0
|
||
|
; AVX2-NEXT: vpsrld $31, %xmm0, %xmm1
|
||
|
; AVX2-NEXT: vpsrad $2, %xmm0, %xmm0
|
||
|
; AVX2-NEXT: vpaddd %xmm1, %xmm0, %xmm0
|
||
|
; AVX2-NEXT: retq
|
||
|
%res = sdiv <4 x i32> %a, <i32 7, i32 7, i32 7, i32 7>
|
||
|
ret <4 x i32> %res
|
||
|
}
|
||
|
|
||
|
define <8 x i16> @test_div7_8i16(<8 x i16> %a) nounwind {
|
||
|
; SSE-LABEL: test_div7_8i16:
|
||
|
; SSE: # BB#0:
|
||
|
; SSE-NEXT: pmulhw {{.*}}(%rip), %xmm0
|
||
|
; SSE-NEXT: movdqa %xmm0, %xmm1
|
||
|
; SSE-NEXT: psrlw $15, %xmm1
|
||
|
; SSE-NEXT: psraw $1, %xmm0
|
||
|
; SSE-NEXT: paddw %xmm1, %xmm0
|
||
|
; SSE-NEXT: retq
|
||
|
;
|
||
|
; AVX-LABEL: test_div7_8i16:
|
||
|
; AVX: # BB#0:
|
||
|
; AVX-NEXT: vpmulhw {{.*}}(%rip), %xmm0, %xmm0
|
||
|
; AVX-NEXT: vpsrlw $15, %xmm0, %xmm1
|
||
|
; AVX-NEXT: vpsraw $1, %xmm0, %xmm0
|
||
|
; AVX-NEXT: vpaddw %xmm1, %xmm0, %xmm0
|
||
|
; AVX-NEXT: retq
|
||
|
%res = sdiv <8 x i16> %a, <i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7>
|
||
|
ret <8 x i16> %res
|
||
|
}
|
||
|
|
||
|
define <16 x i8> @test_div7_16i8(<16 x i8> %a) nounwind {
|
||
|
; SSE2-LABEL: test_div7_16i8:
|
||
|
; SSE2: # BB#0:
|
||
|
; SSE2-NEXT: pushq %rbp
|
||
|
; SSE2-NEXT: pushq %r14
|
||
|
; SSE2-NEXT: pushq %rbx
|
||
|
; SSE2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %eax
|
||
|
; SSE2-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE2-NEXT: shrl $8, %ecx
|
||
|
; SSE2-NEXT: addb %al, %cl
|
||
|
; SSE2-NEXT: movb %cl, %al
|
||
|
; SSE2-NEXT: shrb $7, %al
|
||
|
; SSE2-NEXT: sarb $2, %cl
|
||
|
; SSE2-NEXT: addb %al, %cl
|
||
|
; SSE2-NEXT: movzbl %cl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r14d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %edx
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r9d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %eax
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r11d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ecx
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r8d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %esi
|
||
|
; SSE2-NEXT: imull $-109, %esi, %edi
|
||
|
; SSE2-NEXT: shrl $8, %edi
|
||
|
; SSE2-NEXT: addb %sil, %dil
|
||
|
; SSE2-NEXT: movb %dil, %bl
|
||
|
; SSE2-NEXT: shrb $7, %bl
|
||
|
; SSE2-NEXT: sarb $2, %dil
|
||
|
; SSE2-NEXT: addb %bl, %dil
|
||
|
; SSE2-NEXT: movzbl %dil, %esi
|
||
|
; SSE2-NEXT: movd %esi, %xmm1
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
|
||
|
; SSE2-NEXT: imull $-109, %eax, %esi
|
||
|
; SSE2-NEXT: shrl $8, %esi
|
||
|
; SSE2-NEXT: addb %al, %sil
|
||
|
; SSE2-NEXT: movb %sil, %al
|
||
|
; SSE2-NEXT: shrb $7, %al
|
||
|
; SSE2-NEXT: sarb $2, %sil
|
||
|
; SSE2-NEXT: addb %al, %sil
|
||
|
; SSE2-NEXT: movzbl %sil, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm2
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ebp
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %esi
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r10d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %edi
|
||
|
; SSE2-NEXT: imull $-109, %edi, %ebx
|
||
|
; SSE2-NEXT: shrl $8, %ebx
|
||
|
; SSE2-NEXT: addb %dil, %bl
|
||
|
; SSE2-NEXT: movb %bl, %al
|
||
|
; SSE2-NEXT: shrb $7, %al
|
||
|
; SSE2-NEXT: sarb $2, %bl
|
||
|
; SSE2-NEXT: addb %al, %bl
|
||
|
; SSE2-NEXT: movzbl %bl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
|
||
|
; SSE2-NEXT: imull $-109, %edx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm1
|
||
|
; SSE2-NEXT: imull $-109, %esi, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %sil, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm2
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
|
||
|
; SSE2-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm3
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ecx
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %eax
|
||
|
; SSE2-NEXT: imull $-109, %eax, %edx
|
||
|
; SSE2-NEXT: shrl $8, %edx
|
||
|
; SSE2-NEXT: addb %al, %dl
|
||
|
; SSE2-NEXT: movb %dl, %al
|
||
|
; SSE2-NEXT: shrb $7, %al
|
||
|
; SSE2-NEXT: sarb $2, %dl
|
||
|
; SSE2-NEXT: addb %al, %dl
|
||
|
; SSE2-NEXT: movzbl %dl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm1
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3],xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
|
||
|
; SSE2-NEXT: imull $-109, %r14d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r14b, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm2
|
||
|
; SSE2-NEXT: imull $-109, %ebp, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %bpl, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
|
||
|
; SSE2-NEXT: imull $-109, %r11d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r11b, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm3
|
||
|
; SSE2-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm2
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3],xmm2[4],xmm0[4],xmm2[5],xmm0[5],xmm2[6],xmm0[6],xmm2[7],xmm0[7]
|
||
|
; SSE2-NEXT: imull $-109, %r9d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r9b, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: imull $-109, %r10d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r10b, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm3
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
|
||
|
; SSE2-NEXT: imull $-109, %r8d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r8b, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movzbl %al, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm4
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %eax
|
||
|
; SSE2-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE2-NEXT: shrl $8, %ecx
|
||
|
; SSE2-NEXT: addb %al, %cl
|
||
|
; SSE2-NEXT: movb %cl, %al
|
||
|
; SSE2-NEXT: shrb $7, %al
|
||
|
; SSE2-NEXT: sarb $2, %cl
|
||
|
; SSE2-NEXT: addb %al, %cl
|
||
|
; SSE2-NEXT: movzbl %cl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3],xmm0[4],xmm3[4],xmm0[5],xmm3[5],xmm0[6],xmm3[6],xmm0[7],xmm3[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
|
||
|
; SSE2-NEXT: popq %rbx
|
||
|
; SSE2-NEXT: popq %r14
|
||
|
; SSE2-NEXT: popq %rbp
|
||
|
; SSE2-NEXT: retq
|
||
|
;
|
||
|
; SSE41-LABEL: test_div7_16i8:
|
||
|
; SSE41: # BB#0:
|
||
|
; SSE41-NEXT: pextrb $1, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pextrb $0, %xmm0, %ecx
|
||
|
; SSE41-NEXT: movsbl %cl, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %edx
|
||
|
; SSE41-NEXT: shrl $8, %edx
|
||
|
; SSE41-NEXT: addb %dl, %cl
|
||
|
; SSE41-NEXT: movb %cl, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %cl
|
||
|
; SSE41-NEXT: addb %dl, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %ecx
|
||
|
; SSE41-NEXT: movd %ecx, %xmm1
|
||
|
; SSE41-NEXT: pinsrb $1, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $2, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $2, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $3, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $3, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $4, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $4, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $5, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $5, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $6, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $6, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $7, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $7, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $8, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $8, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $9, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $9, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $10, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $10, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $11, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $11, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $12, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $12, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $13, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $13, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $14, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $14, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $15, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %eax
|
||
|
; SSE41-NEXT: imull $-109, %eax, %ecx
|
||
|
; SSE41-NEXT: shrl $8, %ecx
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movzbl %al, %eax
|
||
|
; SSE41-NEXT: pinsrb $15, %eax, %xmm1
|
||
|
; SSE41-NEXT: movdqa %xmm1, %xmm0
|
||
|
; SSE41-NEXT: retq
|
||
|
;
|
||
|
; AVX-LABEL: test_div7_16i8:
|
||
|
; AVX: # BB#0:
|
||
|
; AVX-NEXT: vpextrb $1, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpextrb $0, %xmm0, %ecx
|
||
|
; AVX-NEXT: movsbl %cl, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %edx
|
||
|
; AVX-NEXT: shrl $8, %edx
|
||
|
; AVX-NEXT: addb %dl, %cl
|
||
|
; AVX-NEXT: movb %cl, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %cl
|
||
|
; AVX-NEXT: addb %dl, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %ecx
|
||
|
; AVX-NEXT: vmovd %ecx, %xmm1
|
||
|
; AVX-NEXT: vpinsrb $1, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $2, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $2, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $3, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $3, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $4, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $4, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $5, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $5, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $6, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $6, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $7, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $7, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $8, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $9, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $9, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $10, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $10, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $11, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $11, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $12, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $13, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $13, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $14, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $14, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $15, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %eax
|
||
|
; AVX-NEXT: imull $-109, %eax, %ecx
|
||
|
; AVX-NEXT: shrl $8, %ecx
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movzbl %al, %eax
|
||
|
; AVX-NEXT: vpinsrb $15, %eax, %xmm1, %xmm0
|
||
|
; AVX-NEXT: retq
|
||
|
%res = sdiv <16 x i8> %a, <i8 7, i8 7, i8 7, i8 7,i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7,i8 7, i8 7, i8 7, i8 7>
|
||
|
ret <16 x i8> %res
|
||
|
}
|
||
|
|
||
|
;
|
||
|
; srem by 7
|
||
|
;
|
||
|
|
||
|
define <2 x i64> @test_rem7_2i64(<2 x i64> %a) nounwind {
|
||
|
; SSE2-LABEL: test_rem7_2i64:
|
||
|
; SSE2: # BB#0:
|
||
|
; SSE2-NEXT: movd %xmm0, %rcx
|
||
|
; SSE2-NEXT: movabsq $5270498306774157605, %rsi # imm = 0x4924924924924925
|
||
|
; SSE2-NEXT: movq %rcx, %rax
|
||
|
; SSE2-NEXT: imulq %rsi
|
||
|
; SSE2-NEXT: movq %rdx, %rax
|
||
|
; SSE2-NEXT: shrq $63, %rax
|
||
|
; SSE2-NEXT: sarq %rdx
|
||
|
; SSE2-NEXT: addq %rax, %rdx
|
||
|
; SSE2-NEXT: leaq (,%rdx,8), %rax
|
||
|
; SSE2-NEXT: subq %rdx, %rax
|
||
|
; SSE2-NEXT: subq %rax, %rcx
|
||
|
; SSE2-NEXT: movd %rcx, %xmm1
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[2,3,0,1]
|
||
|
; SSE2-NEXT: movd %xmm0, %rcx
|
||
|
; SSE2-NEXT: movq %rcx, %rax
|
||
|
; SSE2-NEXT: imulq %rsi
|
||
|
; SSE2-NEXT: movq %rdx, %rax
|
||
|
; SSE2-NEXT: shrq $63, %rax
|
||
|
; SSE2-NEXT: sarq %rdx
|
||
|
; SSE2-NEXT: addq %rax, %rdx
|
||
|
; SSE2-NEXT: leaq (,%rdx,8), %rax
|
||
|
; SSE2-NEXT: subq %rdx, %rax
|
||
|
; SSE2-NEXT: subq %rax, %rcx
|
||
|
; SSE2-NEXT: movd %rcx, %xmm0
|
||
|
; SSE2-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
|
||
|
; SSE2-NEXT: movdqa %xmm1, %xmm0
|
||
|
; SSE2-NEXT: retq
|
||
|
;
|
||
|
; SSE41-LABEL: test_rem7_2i64:
|
||
|
; SSE41: # BB#0:
|
||
|
; SSE41-NEXT: pextrq $1, %xmm0, %rcx
|
||
|
; SSE41-NEXT: movabsq $5270498306774157605, %rsi # imm = 0x4924924924924925
|
||
|
; SSE41-NEXT: movq %rcx, %rax
|
||
|
; SSE41-NEXT: imulq %rsi
|
||
|
; SSE41-NEXT: movq %rdx, %rax
|
||
|
; SSE41-NEXT: shrq $63, %rax
|
||
|
; SSE41-NEXT: sarq %rdx
|
||
|
; SSE41-NEXT: addq %rax, %rdx
|
||
|
; SSE41-NEXT: leaq (,%rdx,8), %rax
|
||
|
; SSE41-NEXT: subq %rdx, %rax
|
||
|
; SSE41-NEXT: subq %rax, %rcx
|
||
|
; SSE41-NEXT: movd %rcx, %xmm1
|
||
|
; SSE41-NEXT: movd %xmm0, %rcx
|
||
|
; SSE41-NEXT: movq %rcx, %rax
|
||
|
; SSE41-NEXT: imulq %rsi
|
||
|
; SSE41-NEXT: movq %rdx, %rax
|
||
|
; SSE41-NEXT: shrq $63, %rax
|
||
|
; SSE41-NEXT: sarq %rdx
|
||
|
; SSE41-NEXT: addq %rax, %rdx
|
||
|
; SSE41-NEXT: leaq (,%rdx,8), %rax
|
||
|
; SSE41-NEXT: subq %rdx, %rax
|
||
|
; SSE41-NEXT: subq %rax, %rcx
|
||
|
; SSE41-NEXT: movd %rcx, %xmm0
|
||
|
; SSE41-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
||
|
; SSE41-NEXT: retq
|
||
|
;
|
||
|
; AVX-LABEL: test_rem7_2i64:
|
||
|
; AVX: # BB#0:
|
||
|
; AVX-NEXT: vpextrq $1, %xmm0, %rcx
|
||
|
; AVX-NEXT: movabsq $5270498306774157605, %rsi # imm = 0x4924924924924925
|
||
|
; AVX-NEXT: movq %rcx, %rax
|
||
|
; AVX-NEXT: imulq %rsi
|
||
|
; AVX-NEXT: movq %rdx, %rax
|
||
|
; AVX-NEXT: shrq $63, %rax
|
||
|
; AVX-NEXT: sarq %rdx
|
||
|
; AVX-NEXT: addq %rax, %rdx
|
||
|
; AVX-NEXT: leaq (,%rdx,8), %rax
|
||
|
; AVX-NEXT: subq %rdx, %rax
|
||
|
; AVX-NEXT: subq %rax, %rcx
|
||
|
; AVX-NEXT: vmovq %rcx, %xmm1
|
||
|
; AVX-NEXT: vmovq %xmm0, %rcx
|
||
|
; AVX-NEXT: movq %rcx, %rax
|
||
|
; AVX-NEXT: imulq %rsi
|
||
|
; AVX-NEXT: movq %rdx, %rax
|
||
|
; AVX-NEXT: shrq $63, %rax
|
||
|
; AVX-NEXT: sarq %rdx
|
||
|
; AVX-NEXT: addq %rax, %rdx
|
||
|
; AVX-NEXT: leaq (,%rdx,8), %rax
|
||
|
; AVX-NEXT: subq %rdx, %rax
|
||
|
; AVX-NEXT: subq %rax, %rcx
|
||
|
; AVX-NEXT: vmovq %rcx, %xmm0
|
||
|
; AVX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
||
|
; AVX-NEXT: retq
|
||
|
%res = srem <2 x i64> %a, <i64 7, i64 7>
|
||
|
ret <2 x i64> %res
|
||
|
}
|
||
|
|
||
|
define <4 x i32> @test_rem7_4i32(<4 x i32> %a) nounwind {
|
||
|
; SSE2-LABEL: test_rem7_4i32:
|
||
|
; SSE2: # BB#0:
|
||
|
; SSE2-NEXT: movdqa {{.*#+}} xmm1 = [2454267027,2454267027,2454267027,2454267027]
|
||
|
; SSE2-NEXT: movdqa %xmm0, %xmm2
|
||
|
; SSE2-NEXT: psrad $31, %xmm2
|
||
|
; SSE2-NEXT: pand %xmm1, %xmm2
|
||
|
; SSE2-NEXT: movdqa %xmm0, %xmm3
|
||
|
; SSE2-NEXT: pmuludq %xmm1, %xmm3
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm4 = xmm1[1,1,3,3]
|
||
|
; SSE2-NEXT: psrad $31, %xmm1
|
||
|
; SSE2-NEXT: pand %xmm0, %xmm1
|
||
|
; SSE2-NEXT: paddd %xmm1, %xmm2
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm3[1,3,2,3]
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
|
||
|
; SSE2-NEXT: pmuludq %xmm4, %xmm3
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm3[1,3,2,3]
|
||
|
; SSE2-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
|
||
|
; SSE2-NEXT: psubd %xmm2, %xmm1
|
||
|
; SSE2-NEXT: paddd %xmm0, %xmm1
|
||
|
; SSE2-NEXT: movdqa %xmm1, %xmm2
|
||
|
; SSE2-NEXT: psrld $31, %xmm2
|
||
|
; SSE2-NEXT: psrad $2, %xmm1
|
||
|
; SSE2-NEXT: paddd %xmm2, %xmm1
|
||
|
; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [7,7,7,7]
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,1,3,3]
|
||
|
; SSE2-NEXT: pmuludq %xmm2, %xmm1
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,2,2,3]
|
||
|
; SSE2-NEXT: pmuludq %xmm2, %xmm3
|
||
|
; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm3[0,2,2,3]
|
||
|
; SSE2-NEXT: punpckldq {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
|
||
|
; SSE2-NEXT: psubd %xmm1, %xmm0
|
||
|
; SSE2-NEXT: retq
|
||
|
;
|
||
|
; SSE41-LABEL: test_rem7_4i32:
|
||
|
; SSE41: # BB#0:
|
||
|
; SSE41-NEXT: movdqa {{.*#+}} xmm1 = [2454267027,2454267027,2454267027,2454267027]
|
||
|
; SSE41-NEXT: pshufd {{.*#+}} xmm2 = xmm1[1,1,3,3]
|
||
|
; SSE41-NEXT: pshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
|
||
|
; SSE41-NEXT: pmuldq %xmm2, %xmm3
|
||
|
; SSE41-NEXT: pmuldq %xmm0, %xmm1
|
||
|
; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
|
||
|
; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm1[0,1],xmm3[2,3],xmm1[4,5],xmm3[6,7]
|
||
|
; SSE41-NEXT: paddd %xmm0, %xmm1
|
||
|
; SSE41-NEXT: movdqa %xmm1, %xmm2
|
||
|
; SSE41-NEXT: psrld $31, %xmm2
|
||
|
; SSE41-NEXT: psrad $2, %xmm1
|
||
|
; SSE41-NEXT: paddd %xmm2, %xmm1
|
||
|
; SSE41-NEXT: pmulld {{.*}}(%rip), %xmm1
|
||
|
; SSE41-NEXT: psubd %xmm1, %xmm0
|
||
|
; SSE41-NEXT: retq
|
||
|
;
|
||
|
; AVX1-LABEL: test_rem7_4i32:
|
||
|
; AVX1: # BB#0:
|
||
|
; AVX1-NEXT: vmovdqa {{.*#+}} xmm1 = [2454267027,2454267027,2454267027,2454267027]
|
||
|
; AVX1-NEXT: vpshufd {{.*#+}} xmm2 = xmm1[1,1,3,3]
|
||
|
; AVX1-NEXT: vpshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
|
||
|
; AVX1-NEXT: vpmuldq %xmm2, %xmm3, %xmm2
|
||
|
; AVX1-NEXT: vpmuldq %xmm1, %xmm0, %xmm1
|
||
|
; AVX1-NEXT: vpshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
|
||
|
; AVX1-NEXT: vpblendw {{.*#+}} xmm1 = xmm1[0,1],xmm2[2,3],xmm1[4,5],xmm2[6,7]
|
||
|
; AVX1-NEXT: vpaddd %xmm0, %xmm1, %xmm1
|
||
|
; AVX1-NEXT: vpsrld $31, %xmm1, %xmm2
|
||
|
; AVX1-NEXT: vpsrad $2, %xmm1, %xmm1
|
||
|
; AVX1-NEXT: vpaddd %xmm2, %xmm1, %xmm1
|
||
|
; AVX1-NEXT: vpmulld {{.*}}(%rip), %xmm1, %xmm1
|
||
|
; AVX1-NEXT: vpsubd %xmm1, %xmm0, %xmm0
|
||
|
; AVX1-NEXT: retq
|
||
|
;
|
||
|
; AVX2-LABEL: test_rem7_4i32:
|
||
|
; AVX2: # BB#0:
|
||
|
; AVX2-NEXT: vpbroadcastd {{.*}}(%rip), %xmm1
|
||
|
; AVX2-NEXT: vpshufd {{.*#+}} xmm2 = xmm1[1,1,3,3]
|
||
|
; AVX2-NEXT: vpshufd {{.*#+}} xmm3 = xmm0[1,1,3,3]
|
||
|
; AVX2-NEXT: vpmuldq %xmm2, %xmm3, %xmm2
|
||
|
; AVX2-NEXT: vpmuldq %xmm1, %xmm0, %xmm1
|
||
|
; AVX2-NEXT: vpshufd {{.*#+}} xmm1 = xmm1[1,1,3,3]
|
||
|
; AVX2-NEXT: vpblendd {{.*#+}} xmm1 = xmm1[0],xmm2[1],xmm1[2],xmm2[3]
|
||
|
; AVX2-NEXT: vpaddd %xmm0, %xmm1, %xmm1
|
||
|
; AVX2-NEXT: vpsrld $31, %xmm1, %xmm2
|
||
|
; AVX2-NEXT: vpsrad $2, %xmm1, %xmm1
|
||
|
; AVX2-NEXT: vpaddd %xmm2, %xmm1, %xmm1
|
||
|
; AVX2-NEXT: vpbroadcastd {{.*}}(%rip), %xmm2
|
||
|
; AVX2-NEXT: vpmulld %xmm2, %xmm1, %xmm1
|
||
|
; AVX2-NEXT: vpsubd %xmm1, %xmm0, %xmm0
|
||
|
; AVX2-NEXT: retq
|
||
|
%res = srem <4 x i32> %a, <i32 7, i32 7, i32 7, i32 7>
|
||
|
ret <4 x i32> %res
|
||
|
}
|
||
|
|
||
|
define <8 x i16> @test_rem7_8i16(<8 x i16> %a) nounwind {
|
||
|
; SSE-LABEL: test_rem7_8i16:
|
||
|
; SSE: # BB#0:
|
||
|
; SSE-NEXT: movdqa {{.*#+}} xmm1 = [18725,18725,18725,18725,18725,18725,18725,18725]
|
||
|
; SSE-NEXT: pmulhw %xmm0, %xmm1
|
||
|
; SSE-NEXT: movdqa %xmm1, %xmm2
|
||
|
; SSE-NEXT: psrlw $15, %xmm2
|
||
|
; SSE-NEXT: psraw $1, %xmm1
|
||
|
; SSE-NEXT: paddw %xmm2, %xmm1
|
||
|
; SSE-NEXT: pmullw {{.*}}(%rip), %xmm1
|
||
|
; SSE-NEXT: psubw %xmm1, %xmm0
|
||
|
; SSE-NEXT: retq
|
||
|
;
|
||
|
; AVX-LABEL: test_rem7_8i16:
|
||
|
; AVX: # BB#0:
|
||
|
; AVX-NEXT: vpmulhw {{.*}}(%rip), %xmm0, %xmm1
|
||
|
; AVX-NEXT: vpsrlw $15, %xmm1, %xmm2
|
||
|
; AVX-NEXT: vpsraw $1, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpaddw %xmm2, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpmullw {{.*}}(%rip), %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpsubw %xmm1, %xmm0, %xmm0
|
||
|
; AVX-NEXT: retq
|
||
|
%res = srem <8 x i16> %a, <i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7>
|
||
|
ret <8 x i16> %res
|
||
|
}
|
||
|
|
||
|
define <16 x i8> @test_rem7_16i8(<16 x i8> %a) nounwind {
|
||
|
; SSE2-LABEL: test_rem7_16i8:
|
||
|
; SSE2: # BB#0:
|
||
|
; SSE2-NEXT: pushq %rbp
|
||
|
; SSE2-NEXT: pushq %r15
|
||
|
; SSE2-NEXT: pushq %r14
|
||
|
; SSE2-NEXT: pushq %rbx
|
||
|
; SSE2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ecx
|
||
|
; SSE2-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movb $7, %r11b
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %cl
|
||
|
; SSE2-NEXT: movzbl %cl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r15d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ebx
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r9d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %edi
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r14d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %esi
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r8d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ebp
|
||
|
; SSE2-NEXT: imull $-109, %ebp, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %bpl, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %bpl
|
||
|
; SSE2-NEXT: movzbl %bpl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm1
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
|
||
|
; SSE2-NEXT: imull $-109, %edi, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %dil, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %dil
|
||
|
; SSE2-NEXT: movzbl %dil, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm2
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %edi
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ebp
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %r10d
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %edx
|
||
|
; SSE2-NEXT: imull $-109, %edx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %dl
|
||
|
; SSE2-NEXT: movzbl %dl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
|
||
|
; SSE2-NEXT: imull $-109, %ebx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %bl, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %bl
|
||
|
; SSE2-NEXT: movzbl %bl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm1
|
||
|
; SSE2-NEXT: imull $-109, %ebp, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %bpl, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %bpl
|
||
|
; SSE2-NEXT: movzbl %bpl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm2
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
|
||
|
; SSE2-NEXT: imull $-109, %esi, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %sil, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %sil
|
||
|
; SSE2-NEXT: movzbl %sil, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm3
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ecx
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %edx
|
||
|
; SSE2-NEXT: imull $-109, %edx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: movb %al, %bl
|
||
|
; SSE2-NEXT: shrb $7, %bl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %bl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %dl
|
||
|
; SSE2-NEXT: movzbl %dl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm1
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1],xmm1[2],xmm3[2],xmm1[3],xmm3[3],xmm1[4],xmm3[4],xmm1[5],xmm3[5],xmm1[6],xmm3[6],xmm1[7],xmm3[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3],xmm1[4],xmm2[4],xmm1[5],xmm2[5],xmm1[6],xmm2[6],xmm1[7],xmm2[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
|
||
|
; SSE2-NEXT: imull $-109, %r15d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r15b, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %r15b
|
||
|
; SSE2-NEXT: movzbl %r15b, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm2
|
||
|
; SSE2-NEXT: imull $-109, %edi, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %dil, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %dil
|
||
|
; SSE2-NEXT: movzbl %dil, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
|
||
|
; SSE2-NEXT: imull $-109, %r14d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r14b, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %r14b
|
||
|
; SSE2-NEXT: movzbl %r14b, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm3
|
||
|
; SSE2-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %cl
|
||
|
; SSE2-NEXT: movzbl %cl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm2
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3],xmm2[4],xmm3[4],xmm2[5],xmm3[5],xmm2[6],xmm3[6],xmm2[7],xmm3[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3],xmm2[4],xmm0[4],xmm2[5],xmm0[5],xmm2[6],xmm0[6],xmm2[7],xmm0[7]
|
||
|
; SSE2-NEXT: imull $-109, %r9d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r9b, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %r9b
|
||
|
; SSE2-NEXT: movzbl %r9b, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: imull $-109, %r10d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r10b, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %r10b
|
||
|
; SSE2-NEXT: movzbl %r10b, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm3
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3],xmm3[4],xmm0[4],xmm3[5],xmm0[5],xmm3[6],xmm0[6],xmm3[7],xmm0[7]
|
||
|
; SSE2-NEXT: imull $-109, %r8d, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %r8b, %al
|
||
|
; SSE2-NEXT: movb %al, %cl
|
||
|
; SSE2-NEXT: shrb $7, %cl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %r8b
|
||
|
; SSE2-NEXT: movzbl %r8b, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm4
|
||
|
; SSE2-NEXT: movsbl -{{[0-9]+}}(%rsp), %ecx
|
||
|
; SSE2-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE2-NEXT: shrl $8, %eax
|
||
|
; SSE2-NEXT: addb %cl, %al
|
||
|
; SSE2-NEXT: movb %al, %dl
|
||
|
; SSE2-NEXT: shrb $7, %dl
|
||
|
; SSE2-NEXT: sarb $2, %al
|
||
|
; SSE2-NEXT: addb %dl, %al
|
||
|
; SSE2-NEXT: mulb %r11b
|
||
|
; SSE2-NEXT: subb %al, %cl
|
||
|
; SSE2-NEXT: movzbl %cl, %eax
|
||
|
; SSE2-NEXT: movd %eax, %xmm0
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3],xmm0[4],xmm4[4],xmm0[5],xmm4[5],xmm0[6],xmm4[6],xmm0[7],xmm4[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3],xmm0[4],xmm3[4],xmm0[5],xmm3[5],xmm0[6],xmm3[6],xmm0[7],xmm3[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3],xmm0[4],xmm2[4],xmm0[5],xmm2[5],xmm0[6],xmm2[6],xmm0[7],xmm2[7]
|
||
|
; SSE2-NEXT: punpcklbw {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
|
||
|
; SSE2-NEXT: popq %rbx
|
||
|
; SSE2-NEXT: popq %r14
|
||
|
; SSE2-NEXT: popq %r15
|
||
|
; SSE2-NEXT: popq %rbp
|
||
|
; SSE2-NEXT: retq
|
||
|
;
|
||
|
; SSE41-LABEL: test_rem7_16i8:
|
||
|
; SSE41: # BB#0:
|
||
|
; SSE41-NEXT: pextrb $1, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %edx
|
||
|
; SSE41-NEXT: imull $-109, %edx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb $7, %dil
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %dl
|
||
|
; SSE41-NEXT: movzbl %dl, %edx
|
||
|
; SSE41-NEXT: pextrb $0, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %esi
|
||
|
; SSE41-NEXT: imull $-109, %esi, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %sil, %al
|
||
|
; SSE41-NEXT: movb %al, %cl
|
||
|
; SSE41-NEXT: shrb $7, %cl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %sil
|
||
|
; SSE41-NEXT: movzbl %sil, %eax
|
||
|
; SSE41-NEXT: movd %eax, %xmm1
|
||
|
; SSE41-NEXT: pinsrb $1, %edx, %xmm1
|
||
|
; SSE41-NEXT: pextrb $2, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $2, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $3, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $3, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $4, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $4, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $5, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $5, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $6, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $6, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $7, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $7, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $8, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $8, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $9, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $9, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $10, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $10, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $11, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $11, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $12, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $12, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $13, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $13, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $14, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $14, %eax, %xmm1
|
||
|
; SSE41-NEXT: pextrb $15, %xmm0, %eax
|
||
|
; SSE41-NEXT: movsbl %al, %ecx
|
||
|
; SSE41-NEXT: imull $-109, %ecx, %eax
|
||
|
; SSE41-NEXT: shrl $8, %eax
|
||
|
; SSE41-NEXT: addb %cl, %al
|
||
|
; SSE41-NEXT: movb %al, %dl
|
||
|
; SSE41-NEXT: shrb $7, %dl
|
||
|
; SSE41-NEXT: sarb $2, %al
|
||
|
; SSE41-NEXT: addb %dl, %al
|
||
|
; SSE41-NEXT: mulb %dil
|
||
|
; SSE41-NEXT: subb %al, %cl
|
||
|
; SSE41-NEXT: movzbl %cl, %eax
|
||
|
; SSE41-NEXT: pinsrb $15, %eax, %xmm1
|
||
|
; SSE41-NEXT: movdqa %xmm1, %xmm0
|
||
|
; SSE41-NEXT: retq
|
||
|
;
|
||
|
; AVX-LABEL: test_rem7_16i8:
|
||
|
; AVX: # BB#0:
|
||
|
; AVX-NEXT: vpextrb $1, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %edx
|
||
|
; AVX-NEXT: imull $-109, %edx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb $7, %dil
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %dl
|
||
|
; AVX-NEXT: movzbl %dl, %edx
|
||
|
; AVX-NEXT: vpextrb $0, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %esi
|
||
|
; AVX-NEXT: imull $-109, %esi, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %sil, %al
|
||
|
; AVX-NEXT: movb %al, %cl
|
||
|
; AVX-NEXT: shrb $7, %cl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %sil
|
||
|
; AVX-NEXT: movzbl %sil, %eax
|
||
|
; AVX-NEXT: vmovd %eax, %xmm1
|
||
|
; AVX-NEXT: vpinsrb $1, %edx, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $2, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $2, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $3, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $3, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $4, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $4, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $5, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $5, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $6, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $6, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $7, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $7, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $8, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $8, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $9, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $9, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $10, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $10, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $11, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $11, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $12, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $12, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $13, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $13, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $14, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $14, %eax, %xmm1, %xmm1
|
||
|
; AVX-NEXT: vpextrb $15, %xmm0, %eax
|
||
|
; AVX-NEXT: movsbl %al, %ecx
|
||
|
; AVX-NEXT: imull $-109, %ecx, %eax
|
||
|
; AVX-NEXT: shrl $8, %eax
|
||
|
; AVX-NEXT: addb %cl, %al
|
||
|
; AVX-NEXT: movb %al, %dl
|
||
|
; AVX-NEXT: shrb $7, %dl
|
||
|
; AVX-NEXT: sarb $2, %al
|
||
|
; AVX-NEXT: addb %dl, %al
|
||
|
; AVX-NEXT: mulb %dil
|
||
|
; AVX-NEXT: subb %al, %cl
|
||
|
; AVX-NEXT: movzbl %cl, %eax
|
||
|
; AVX-NEXT: vpinsrb $15, %eax, %xmm1, %xmm0
|
||
|
; AVX-NEXT: retq
|
||
|
%res = srem <16 x i8> %a, <i8 7, i8 7, i8 7, i8 7,i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7,i8 7, i8 7, i8 7, i8 7>
|
||
|
ret <16 x i8> %res
|
||
|
}
|