[llvm] ecba9d7 - [X86][AVX] Add missing non AVX512VL broadcastm test coverage
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 11:12:05 PDT 2020
Author: Simon Pilgrim
Date: 2020-09-18T19:11:29+01:00
New Revision: ecba9d793e205ac857196abbd00cd67777e6f51a
URL: https://github.com/llvm/llvm-project/commit/ecba9d793e205ac857196abbd00cd67777e6f51a
DIFF: https://github.com/llvm/llvm-project/commit/ecba9d793e205ac857196abbd00cd67777e6f51a.diff
LOG: [X86][AVX] Add missing non AVX512VL broadcastm test coverage
Added:
Modified:
llvm/test/CodeGen/X86/broadcastm-lowering.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/broadcastm-lowering.ll b/llvm/test/CodeGen/X86/broadcastm-lowering.ll
index 91ac96185db9..bc1ac484169e 100644
--- a/llvm/test/CodeGen/X86/broadcastm-lowering.ll
+++ b/llvm/test/CodeGen/X86/broadcastm-lowering.ll
@@ -1,6 +1,8 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512cd,+fast-variable-shuffle | FileCheck %s --check-prefixes=ALL,AVX512CD,X64-AVX512CD
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512cd,+fast-variable-shuffle | FileCheck %s --check-prefixes=ALL,AVX512CD,X86-AVX512CD
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512cd,+avx512bw,+fast-variable-shuffle | FileCheck %s --check-prefixes=ALL,AVX512CDBW,X64-AVX512CDBW
+; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512cd,+avx512bw,+fast-variable-shuffle | FileCheck %s --check-prefixes=ALL,AVX512CDBW,X86-AVX512CDBW
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,avx512cd,+avx512bw,+fast-variable-shuffle | FileCheck %s --check-prefixes=ALL,AVX512VLCDBW,X64-AVX512VLCDBW
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512vl,avx512cd,+avx512bw,+fast-variable-shuffle | FileCheck %s --check-prefixes=ALL,AVX512VLCDBW,X86-AVX512VLCDBW
@@ -29,6 +31,30 @@ define <2 x i64> @test_mm_epi64(<8 x i16> %a, <8 x i16> %b) {
; X86-AVX512CD-NEXT: vzeroupper
; X86-AVX512CD-NEXT: retl
;
+; X64-AVX512CDBW-LABEL: test_mm_epi64:
+; X64-AVX512CDBW: # %bb.0: # %entry
+; X64-AVX512CDBW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
+; X64-AVX512CDBW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
+; X64-AVX512CDBW-NEXT: vpcmpeqw %zmm1, %zmm0, %k0
+; X64-AVX512CDBW-NEXT: kmovd %k0, %eax
+; X64-AVX512CDBW-NEXT: movzbl %al, %eax
+; X64-AVX512CDBW-NEXT: vmovq %rax, %xmm0
+; X64-AVX512CDBW-NEXT: vpbroadcastq %xmm0, %xmm0
+; X64-AVX512CDBW-NEXT: vzeroupper
+; X64-AVX512CDBW-NEXT: retq
+;
+; X86-AVX512CDBW-LABEL: test_mm_epi64:
+; X86-AVX512CDBW: # %bb.0: # %entry
+; X86-AVX512CDBW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
+; X86-AVX512CDBW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
+; X86-AVX512CDBW-NEXT: vpcmpeqw %zmm1, %zmm0, %k0
+; X86-AVX512CDBW-NEXT: kmovd %k0, %eax
+; X86-AVX512CDBW-NEXT: movzbl %al, %eax
+; X86-AVX512CDBW-NEXT: vmovd %eax, %xmm0
+; X86-AVX512CDBW-NEXT: vpshufb {{.*#+}} xmm0 = xmm0[0,1,2,3],zero,zero,zero,zero,xmm0[0,1,2,3],zero,zero,zero,zero
+; X86-AVX512CDBW-NEXT: vzeroupper
+; X86-AVX512CDBW-NEXT: retl
+;
; AVX512VLCDBW-LABEL: test_mm_epi64:
; AVX512VLCDBW: # %bb.0: # %entry
; AVX512VLCDBW-NEXT: vpcmpeqw %xmm1, %xmm0, %k0
@@ -52,6 +78,17 @@ define <4 x i32> @test_mm_epi32(<16 x i8> %a, <16 x i8> %b) {
; AVX512CD-NEXT: vpbroadcastd %xmm0, %xmm0
; AVX512CD-NEXT: ret{{[l|q]}}
;
+; AVX512CDBW-LABEL: test_mm_epi32:
+; AVX512CDBW: # %bb.0: # %entry
+; AVX512CDBW-NEXT: # kill: def $xmm1 killed $xmm1 def $zmm1
+; AVX512CDBW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
+; AVX512CDBW-NEXT: vpcmpeqb %zmm1, %zmm0, %k0
+; AVX512CDBW-NEXT: kmovw %k0, %eax
+; AVX512CDBW-NEXT: vmovd %eax, %xmm0
+; AVX512CDBW-NEXT: vpbroadcastd %xmm0, %xmm0
+; AVX512CDBW-NEXT: vzeroupper
+; AVX512CDBW-NEXT: ret{{[l|q]}}
+;
; AVX512VLCDBW-LABEL: test_mm_epi32:
; AVX512VLCDBW: # %bb.0: # %entry
; AVX512VLCDBW-NEXT: vpcmpeqb %xmm1, %xmm0, %k0
@@ -90,6 +127,14 @@ define <8 x i64> @test_mm512_epi64(<8 x i32> %a, <8 x i32> %b) {
; AVX512CD-NEXT: vpbroadcastmb2q %k0, %zmm0
; AVX512CD-NEXT: ret{{[l|q]}}
;
+; AVX512CDBW-LABEL: test_mm512_epi64:
+; AVX512CDBW: # %bb.0: # %entry
+; AVX512CDBW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
+; AVX512CDBW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; AVX512CDBW-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
+; AVX512CDBW-NEXT: vpbroadcastmb2q %k0, %zmm0
+; AVX512CDBW-NEXT: ret{{[l|q]}}
+;
; AVX512VLCDBW-LABEL: test_mm512_epi64:
; AVX512VLCDBW: # %bb.0: # %entry
; AVX512VLCDBW-NEXT: vpcmpeqd %ymm1, %ymm0, %k0
@@ -127,6 +172,28 @@ define <4 x i64> @test_mm256_epi64(<8 x i32> %a, <8 x i32> %b) {
; X86-AVX512CD-NEXT: vpbroadcastq %xmm0, %ymm0
; X86-AVX512CD-NEXT: retl
;
+; X64-AVX512CDBW-LABEL: test_mm256_epi64:
+; X64-AVX512CDBW: # %bb.0: # %entry
+; X64-AVX512CDBW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
+; X64-AVX512CDBW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; X64-AVX512CDBW-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
+; X64-AVX512CDBW-NEXT: kmovd %k0, %eax
+; X64-AVX512CDBW-NEXT: movzbl %al, %eax
+; X64-AVX512CDBW-NEXT: vmovq %rax, %xmm0
+; X64-AVX512CDBW-NEXT: vpbroadcastq %xmm0, %ymm0
+; X64-AVX512CDBW-NEXT: retq
+;
+; X86-AVX512CDBW-LABEL: test_mm256_epi64:
+; X86-AVX512CDBW: # %bb.0: # %entry
+; X86-AVX512CDBW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
+; X86-AVX512CDBW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; X86-AVX512CDBW-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
+; X86-AVX512CDBW-NEXT: kmovd %k0, %eax
+; X86-AVX512CDBW-NEXT: movzbl %al, %eax
+; X86-AVX512CDBW-NEXT: vmovd %eax, %xmm0
+; X86-AVX512CDBW-NEXT: vpbroadcastq %xmm0, %ymm0
+; X86-AVX512CDBW-NEXT: retl
+;
; AVX512VLCDBW-LABEL: test_mm256_epi64:
; AVX512VLCDBW: # %bb.0: # %entry
; AVX512VLCDBW-NEXT: vpcmpeqd %ymm1, %ymm0, %k0
@@ -152,6 +219,16 @@ define <8 x i32> @test_mm256_epi32(<16 x i16> %a, <16 x i16> %b) {
; AVX512CD-NEXT: vpbroadcastd %xmm0, %ymm0
; AVX512CD-NEXT: ret{{[l|q]}}
;
+; AVX512CDBW-LABEL: test_mm256_epi32:
+; AVX512CDBW: # %bb.0: # %entry
+; AVX512CDBW-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
+; AVX512CDBW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; AVX512CDBW-NEXT: vpcmpeqw %zmm1, %zmm0, %k0
+; AVX512CDBW-NEXT: kmovw %k0, %eax
+; AVX512CDBW-NEXT: vmovd %eax, %xmm0
+; AVX512CDBW-NEXT: vpbroadcastd %xmm0, %ymm0
+; AVX512CDBW-NEXT: ret{{[l|q]}}
+;
; AVX512VLCDBW-LABEL: test_mm256_epi32:
; AVX512VLCDBW: # %bb.0: # %entry
; AVX512VLCDBW-NEXT: vpcmpeqw %ymm1, %ymm0, %k0
More information about the llvm-commits
mailing list