mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
AVX-512: Simplified masked_gather_scatter test. NFC.
llvm-svn: 281244
This commit is contained in:
parent
fad9dd6ec9
commit
28879fd222
@ -1,8 +1,8 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512f < %s | FileCheck %s --check-prefix=KNL_64
|
||||
; RUN: llc -mtriple=i386-unknown-linux-gnu -mattr=+avx512f < %s | FileCheck %s --check-prefix=KNL_32
|
||||
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512vl -mattr=+avx512dq < %s | FileCheck %s --check-prefix=SKX
|
||||
; RUN: llc -mtriple=i386-unknown-linux-gnu -mattr=+avx512vl -mattr=+avx512dq < %s | FileCheck %s --check-prefix=SKX_32
|
||||
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512f < %s | FileCheck %s --check-prefix=ALL --check-prefix=KNL_64
|
||||
; RUN: llc -mtriple=i386-unknown-linux-gnu -mattr=+avx512f < %s | FileCheck %s --check-prefix=ALL --check-prefix=KNL_32
|
||||
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512vl -mattr=+avx512dq < %s | FileCheck %s --check-prefix=ALL --check-prefix=SKX
|
||||
; RUN: llc -mtriple=i386-unknown-linux-gnu -mattr=+avx512vl -mattr=+avx512dq < %s | FileCheck %s --check-prefix=ALL --check-prefix=SKX_32
|
||||
; RUN: opt -mtriple=x86_64-apple-darwin -codegenprepare -mcpu=corei7-avx -S < %s | FileCheck %s -check-prefix=SCALAR
|
||||
; RUN: llc -O0 -mtriple=x86_64-unknown-linux-gnu -mcpu=skx < %s -o /dev/null
|
||||
|
||||
@ -1547,185 +1547,8 @@ define <16 x float> @test29(float* %base, <16 x i32> %ind) {
|
||||
; Check non-power-of-2 case. It should be scalarized.
|
||||
declare <3 x i32> @llvm.masked.gather.v3i32(<3 x i32*>, i32, <3 x i1>, <3 x i32>)
|
||||
define <3 x i32> @test30(<3 x i32*> %base, <3 x i32> %ind, <3 x i1> %mask, <3 x i32> %src0) {
|
||||
; KNL_64-LABEL: test30:
|
||||
; KNL_64: # BB#0:
|
||||
; KNL_64-NEXT: andl $1, %edx
|
||||
; KNL_64-NEXT: kmovw %edx, %k1
|
||||
; KNL_64-NEXT: andl $1, %esi
|
||||
; KNL_64-NEXT: kmovw %esi, %k2
|
||||
; KNL_64-NEXT: movl %edi, %eax
|
||||
; KNL_64-NEXT: andl $1, %eax
|
||||
; KNL_64-NEXT: kmovw %eax, %k0
|
||||
; KNL_64-NEXT: vpmovsxdq %xmm1, %ymm1
|
||||
; KNL_64-NEXT: vpsllq $2, %ymm1, %ymm1
|
||||
; KNL_64-NEXT: vpaddq %ymm1, %ymm0, %ymm1
|
||||
; KNL_64-NEXT: # implicit-def: %XMM0
|
||||
; KNL_64-NEXT: testb $1, %dil
|
||||
; KNL_64-NEXT: je .LBB29_2
|
||||
; KNL_64-NEXT: # BB#1: # %cond.load
|
||||
; KNL_64-NEXT: vmovq %xmm1, %rax
|
||||
; KNL_64-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
||||
; KNL_64-NEXT: .LBB29_2: # %else
|
||||
; KNL_64-NEXT: kmovw %k2, %eax
|
||||
; KNL_64-NEXT: movl %eax, %ecx
|
||||
; KNL_64-NEXT: andl $1, %ecx
|
||||
; KNL_64-NEXT: testb %cl, %cl
|
||||
; KNL_64-NEXT: je .LBB29_4
|
||||
; KNL_64-NEXT: # BB#3: # %cond.load1
|
||||
; KNL_64-NEXT: vpextrq $1, %xmm1, %rcx
|
||||
; KNL_64-NEXT: vpinsrd $1, (%rcx), %xmm0, %xmm0
|
||||
; KNL_64-NEXT: .LBB29_4: # %else2
|
||||
; KNL_64-NEXT: kmovw %k1, %ecx
|
||||
; KNL_64-NEXT: movl %ecx, %edx
|
||||
; KNL_64-NEXT: andl $1, %edx
|
||||
; KNL_64-NEXT: testb %dl, %dl
|
||||
; KNL_64-NEXT: je .LBB29_6
|
||||
; KNL_64-NEXT: # BB#5: # %cond.load4
|
||||
; KNL_64-NEXT: vextracti128 $1, %ymm1, %xmm1
|
||||
; KNL_64-NEXT: vmovq %xmm1, %rdx
|
||||
; KNL_64-NEXT: vpinsrd $2, (%rdx), %xmm0, %xmm0
|
||||
; KNL_64-NEXT: .LBB29_6: # %else5
|
||||
; KNL_64-NEXT: kmovw %k0, %edx
|
||||
; KNL_64-NEXT: vmovd %edx, %xmm1
|
||||
; KNL_64-NEXT: vpinsrd $1, %eax, %xmm1, %xmm1
|
||||
; KNL_64-NEXT: vpinsrd $2, %ecx, %xmm1, %xmm1
|
||||
; KNL_64-NEXT: vpslld $31, %xmm1, %xmm1
|
||||
; KNL_64-NEXT: vblendvps %xmm1, %xmm0, %xmm2, %xmm0
|
||||
; KNL_64-NEXT: retq
|
||||
;
|
||||
; KNL_32-LABEL: test30:
|
||||
; KNL_32: # BB#0:
|
||||
; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
; KNL_32-NEXT: andl $1, %eax
|
||||
; KNL_32-NEXT: kmovw %eax, %k1
|
||||
; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
; KNL_32-NEXT: andl $1, %eax
|
||||
; KNL_32-NEXT: kmovw %eax, %k2
|
||||
; KNL_32-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
; KNL_32-NEXT: movl %eax, %ecx
|
||||
; KNL_32-NEXT: andl $1, %ecx
|
||||
; KNL_32-NEXT: kmovw %ecx, %k0
|
||||
; KNL_32-NEXT: vpslld $2, %xmm1, %xmm1
|
||||
; KNL_32-NEXT: vpaddd %xmm1, %xmm0, %xmm1
|
||||
; KNL_32-NEXT: # implicit-def: %XMM0
|
||||
; KNL_32-NEXT: testb $1, %al
|
||||
; KNL_32-NEXT: je .LBB29_2
|
||||
; KNL_32-NEXT: # BB#1: # %cond.load
|
||||
; KNL_32-NEXT: vmovd %xmm1, %eax
|
||||
; KNL_32-NEXT: vmovd {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
||||
; KNL_32-NEXT: .LBB29_2: # %else
|
||||
; KNL_32-NEXT: kmovw %k2, %eax
|
||||
; KNL_32-NEXT: movl %eax, %ecx
|
||||
; KNL_32-NEXT: andl $1, %ecx
|
||||
; KNL_32-NEXT: testb %cl, %cl
|
||||
; KNL_32-NEXT: je .LBB29_4
|
||||
; KNL_32-NEXT: # BB#3: # %cond.load1
|
||||
; KNL_32-NEXT: vpextrd $1, %xmm1, %ecx
|
||||
; KNL_32-NEXT: vpinsrd $1, (%ecx), %xmm0, %xmm0
|
||||
; KNL_32-NEXT: .LBB29_4: # %else2
|
||||
; KNL_32-NEXT: kmovw %k1, %ecx
|
||||
; KNL_32-NEXT: movl %ecx, %edx
|
||||
; KNL_32-NEXT: andl $1, %edx
|
||||
; KNL_32-NEXT: testb %dl, %dl
|
||||
; KNL_32-NEXT: je .LBB29_6
|
||||
; KNL_32-NEXT: # BB#5: # %cond.load4
|
||||
; KNL_32-NEXT: vpextrd $2, %xmm1, %edx
|
||||
; KNL_32-NEXT: vpinsrd $2, (%edx), %xmm0, %xmm0
|
||||
; KNL_32-NEXT: .LBB29_6: # %else5
|
||||
; KNL_32-NEXT: kmovw %k0, %edx
|
||||
; KNL_32-NEXT: vmovd %edx, %xmm1
|
||||
; KNL_32-NEXT: vpinsrd $1, %eax, %xmm1, %xmm1
|
||||
; KNL_32-NEXT: vpinsrd $2, %ecx, %xmm1, %xmm1
|
||||
; KNL_32-NEXT: vpslld $31, %xmm1, %xmm1
|
||||
; KNL_32-NEXT: vblendvps %xmm1, %xmm0, %xmm2, %xmm0
|
||||
; KNL_32-NEXT: retl
|
||||
;
|
||||
; SKX-LABEL: test30:
|
||||
; SKX: # BB#0:
|
||||
; SKX-NEXT: vpslld $31, %xmm2, %xmm2
|
||||
; SKX-NEXT: vptestmd %xmm2, %xmm2, %k1
|
||||
; SKX-NEXT: kshiftlw $15, %k1, %k0
|
||||
; SKX-NEXT: kshiftrw $15, %k0, %k0
|
||||
; SKX-NEXT: vpmovsxdq %xmm1, %ymm1
|
||||
; SKX-NEXT: vpsllq $2, %ymm1, %ymm1
|
||||
; SKX-NEXT: vpaddq %ymm1, %ymm0, %ymm0
|
||||
; SKX-NEXT: kmovw %k0, %eax
|
||||
; SKX-NEXT: andl $1, %eax
|
||||
; SKX-NEXT: # implicit-def: %XMM1
|
||||
; SKX-NEXT: testb %al, %al
|
||||
; SKX-NEXT: je .LBB29_2
|
||||
; SKX-NEXT: # BB#1: # %cond.load
|
||||
; SKX-NEXT: vmovq %xmm0, %rax
|
||||
; SKX-NEXT: vmovd {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
||||
; SKX-NEXT: .LBB29_2: # %else
|
||||
; SKX-NEXT: kshiftlw $14, %k1, %k0
|
||||
; SKX-NEXT: kshiftrw $15, %k0, %k0
|
||||
; SKX-NEXT: kmovw %k0, %eax
|
||||
; SKX-NEXT: andl $1, %eax
|
||||
; SKX-NEXT: testb %al, %al
|
||||
; SKX-NEXT: je .LBB29_4
|
||||
; SKX-NEXT: # BB#3: # %cond.load1
|
||||
; SKX-NEXT: vpextrq $1, %xmm0, %rax
|
||||
; SKX-NEXT: vpinsrd $1, (%rax), %xmm1, %xmm1
|
||||
; SKX-NEXT: .LBB29_4: # %else2
|
||||
; SKX-NEXT: kshiftlw $13, %k1, %k0
|
||||
; SKX-NEXT: kshiftrw $15, %k0, %k0
|
||||
; SKX-NEXT: kmovw %k0, %eax
|
||||
; SKX-NEXT: andl $1, %eax
|
||||
; SKX-NEXT: testb %al, %al
|
||||
; SKX-NEXT: je .LBB29_6
|
||||
; SKX-NEXT: # BB#5: # %cond.load4
|
||||
; SKX-NEXT: vextracti64x2 $1, %ymm0, %xmm0
|
||||
; SKX-NEXT: vmovq %xmm0, %rax
|
||||
; SKX-NEXT: vpinsrd $2, (%rax), %xmm1, %xmm1
|
||||
; SKX-NEXT: .LBB29_6: # %else5
|
||||
; SKX-NEXT: vpblendmd %xmm1, %xmm3, %xmm0 {%k1}
|
||||
; SKX-NEXT: retq
|
||||
;
|
||||
; SKX_32-LABEL: test30:
|
||||
; SKX_32: # BB#0:
|
||||
; SKX_32-NEXT: subl $12, %esp
|
||||
; SKX_32-NEXT: .Ltmp0:
|
||||
; SKX_32-NEXT: .cfi_def_cfa_offset 16
|
||||
; SKX_32-NEXT: vpslld $31, %xmm2, %xmm2
|
||||
; SKX_32-NEXT: vptestmd %xmm2, %xmm2, %k1
|
||||
; SKX_32-NEXT: kshiftlw $15, %k1, %k0
|
||||
; SKX_32-NEXT: kshiftrw $15, %k0, %k0
|
||||
; SKX_32-NEXT: vpslld $2, %xmm1, %xmm1
|
||||
; SKX_32-NEXT: vpaddd %xmm1, %xmm0, %xmm0
|
||||
; SKX_32-NEXT: kmovw %k0, %eax
|
||||
; SKX_32-NEXT: andl $1, %eax
|
||||
; SKX_32-NEXT: # implicit-def: %XMM1
|
||||
; SKX_32-NEXT: testb %al, %al
|
||||
; SKX_32-NEXT: je .LBB29_2
|
||||
; SKX_32-NEXT: # BB#1: # %cond.load
|
||||
; SKX_32-NEXT: vmovd %xmm0, %eax
|
||||
; SKX_32-NEXT: vmovd {{.*#+}} xmm1 = mem[0],zero,zero,zero
|
||||
; SKX_32-NEXT: .LBB29_2: # %else
|
||||
; SKX_32-NEXT: kshiftlw $14, %k1, %k0
|
||||
; SKX_32-NEXT: kshiftrw $15, %k0, %k0
|
||||
; SKX_32-NEXT: kmovw %k0, %eax
|
||||
; SKX_32-NEXT: andl $1, %eax
|
||||
; SKX_32-NEXT: testb %al, %al
|
||||
; SKX_32-NEXT: je .LBB29_4
|
||||
; SKX_32-NEXT: # BB#3: # %cond.load1
|
||||
; SKX_32-NEXT: vpextrd $1, %xmm0, %eax
|
||||
; SKX_32-NEXT: vpinsrd $1, (%eax), %xmm1, %xmm1
|
||||
; SKX_32-NEXT: .LBB29_4: # %else2
|
||||
; SKX_32-NEXT: vmovdqa32 {{[0-9]+}}(%esp), %xmm2
|
||||
; SKX_32-NEXT: kshiftlw $13, %k1, %k0
|
||||
; SKX_32-NEXT: kshiftrw $15, %k0, %k0
|
||||
; SKX_32-NEXT: kmovw %k0, %eax
|
||||
; SKX_32-NEXT: andl $1, %eax
|
||||
; SKX_32-NEXT: testb %al, %al
|
||||
; SKX_32-NEXT: je .LBB29_6
|
||||
; SKX_32-NEXT: # BB#5: # %cond.load4
|
||||
; SKX_32-NEXT: vpextrd $2, %xmm0, %eax
|
||||
; SKX_32-NEXT: vpinsrd $2, (%eax), %xmm1, %xmm1
|
||||
; SKX_32-NEXT: .LBB29_6: # %else5
|
||||
; SKX_32-NEXT: vpblendmd %xmm1, %xmm2, %xmm0 {%k1}
|
||||
; SKX_32-NEXT: addl $12, %esp
|
||||
; SKX_32-NEXT: retl
|
||||
; ALL-LABEL: test30:
|
||||
; ALL-NOT: gather
|
||||
|
||||
%sext_ind = sext <3 x i32> %ind to <3 x i64>
|
||||
%gep.random = getelementptr i32, <3 x i32*> %base, <3 x i64> %sext_ind
|
||||
|
Loading…
Reference in New Issue
Block a user