[llvm] 81dce71 - [X86][AVX] Add missing i686 broadcastm test coverage
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 08:21:28 PDT 2020
Author: Simon Pilgrim
Date: 2020-09-18T16:10:24+01:00
New Revision: 81dce71acfaccbeea5dfc28c4bc0431952d8d9ca
URL: https://github.com/llvm/llvm-project/commit/81dce71acfaccbeea5dfc28c4bc0431952d8d9ca
DIFF: https://github.com/llvm/llvm-project/commit/81dce71acfaccbeea5dfc28c4bc0431952d8d9ca.diff
LOG: [X86][AVX] Add missing i686 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 2c84a09fcebf..3dfbdf181ef4 100644
--- a/llvm/test/CodeGen/X86/broadcastm-lowering.ll
+++ b/llvm/test/CodeGen/X86/broadcastm-lowering.ll
@@ -1,26 +1,39 @@
; 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
-; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,avx512cd,+avx512bw,+fast-variable-shuffle | FileCheck %s --check-prefixes=ALL,AVX512VLCDBW
-; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx512vl,avx512cd,+avx512bw,+fast-variable-shuffle | FileCheck %s --check-prefixes=ALL,X86-AVX512VLCDBW
+; 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=+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
define <2 x i64> @test_mm_epi64(<8 x i16> %a, <8 x i16> %b) {
-; AVX512CD-LABEL: test_mm_epi64:
-; AVX512CD: # %bb.0: # %entry
-; AVX512CD-NEXT: vpcmpeqw %xmm1, %xmm0, %xmm0
-; AVX512CD-NEXT: vpmovsxwq %xmm0, %zmm0
-; AVX512CD-NEXT: vptestmq %zmm0, %zmm0, %k0
-; AVX512CD-NEXT: kmovw %k0, %eax
-; AVX512CD-NEXT: movzbl %al, %eax
-; AVX512CD-NEXT: vmovq %rax, %xmm0
-; AVX512CD-NEXT: vpbroadcastq %xmm0, %xmm0
-; AVX512CD-NEXT: vzeroupper
-; AVX512CD-NEXT: retq
+; X64-AVX512CD-LABEL: test_mm_epi64:
+; X64-AVX512CD: # %bb.0: # %entry
+; X64-AVX512CD-NEXT: vpcmpeqw %xmm1, %xmm0, %xmm0
+; X64-AVX512CD-NEXT: vpmovsxwq %xmm0, %zmm0
+; X64-AVX512CD-NEXT: vptestmq %zmm0, %zmm0, %k0
+; X64-AVX512CD-NEXT: kmovw %k0, %eax
+; X64-AVX512CD-NEXT: movzbl %al, %eax
+; X64-AVX512CD-NEXT: vmovq %rax, %xmm0
+; X64-AVX512CD-NEXT: vpbroadcastq %xmm0, %xmm0
+; X64-AVX512CD-NEXT: vzeroupper
+; X64-AVX512CD-NEXT: retq
;
-; AVX512VLCDBW-LABEL: test_mm_epi64:
-; AVX512VLCDBW: # %bb.0: # %entry
-; AVX512VLCDBW-NEXT: vpcmpeqw %xmm1, %xmm0, %k0
-; AVX512VLCDBW-NEXT: vpbroadcastmb2q %k0, %xmm0
-; AVX512VLCDBW-NEXT: retq
+; X86-AVX512CD-LABEL: test_mm_epi64:
+; X86-AVX512CD: # %bb.0: # %entry
+; X86-AVX512CD-NEXT: vpcmpeqw %xmm1, %xmm0, %xmm0
+; X86-AVX512CD-NEXT: vpmovsxwq %xmm0, %zmm0
+; X86-AVX512CD-NEXT: vptestmq %zmm0, %zmm0, %k0
+; X86-AVX512CD-NEXT: kmovw %k0, %eax
+; X86-AVX512CD-NEXT: movzbl %al, %eax
+; X86-AVX512CD-NEXT: vmovd %eax, %xmm0
+; X86-AVX512CD-NEXT: vpshufb {{.*#+}} xmm0 = xmm0[0,1,2,3],zero,zero,zero,zero,xmm0[0,1,2,3],zero,zero,zero,zero
+; X86-AVX512CD-NEXT: vzeroupper
+; X86-AVX512CD-NEXT: retl
+;
+; X64-AVX512VLCDBW-LABEL: test_mm_epi64:
+; X64-AVX512VLCDBW: # %bb.0: # %entry
+; X64-AVX512VLCDBW-NEXT: vpcmpeqw %xmm1, %xmm0, %k0
+; X64-AVX512VLCDBW-NEXT: vpbroadcastmb2q %k0, %xmm0
+; X64-AVX512VLCDBW-NEXT: retq
;
; X86-AVX512VLCDBW-LABEL: test_mm_epi64:
; X86-AVX512VLCDBW: # %bb.0: # %entry
@@ -46,19 +59,13 @@ define <4 x i32> @test_mm_epi32(<16 x i8> %a, <16 x i8> %b) {
; AVX512CD-NEXT: vpmovmskb %xmm0, %eax
; AVX512CD-NEXT: vmovd %eax, %xmm0
; AVX512CD-NEXT: vpbroadcastd %xmm0, %xmm0
-; AVX512CD-NEXT: retq
+; AVX512CD-NEXT: ret{{[l|q]}}
;
; AVX512VLCDBW-LABEL: test_mm_epi32:
; AVX512VLCDBW: # %bb.0: # %entry
; AVX512VLCDBW-NEXT: vpcmpeqb %xmm1, %xmm0, %k0
; AVX512VLCDBW-NEXT: vpbroadcastmw2d %k0, %xmm0
-; AVX512VLCDBW-NEXT: retq
-;
-; X86-AVX512VLCDBW-LABEL: test_mm_epi32:
-; X86-AVX512VLCDBW: # %bb.0: # %entry
-; X86-AVX512VLCDBW-NEXT: vpcmpeqb %xmm1, %xmm0, %k0
-; X86-AVX512VLCDBW-NEXT: vpbroadcastmw2d %k0, %xmm0
-; X86-AVX512VLCDBW-NEXT: retl
+; AVX512VLCDBW-NEXT: ret{{[l|q]}}
entry:
%0 = icmp eq <16 x i8> %a, %b
%1 = bitcast <16 x i1> %0 to i16
@@ -84,19 +91,30 @@ entry:
}
define <8 x i64> @test_mm512_epi64(<8 x i32> %a, <8 x i32> %b) {
-; AVX512CD-LABEL: test_mm512_epi64:
-; AVX512CD: # %bb.0: # %entry
-; AVX512CD-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
-; AVX512CD-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
-; AVX512CD-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
-; AVX512CD-NEXT: vpbroadcastmb2q %k0, %zmm0
-; AVX512CD-NEXT: retq
+; X64-AVX512CD-LABEL: test_mm512_epi64:
+; X64-AVX512CD: # %bb.0: # %entry
+; X64-AVX512CD-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
+; X64-AVX512CD-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; X64-AVX512CD-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
+; X64-AVX512CD-NEXT: vpbroadcastmb2q %k0, %zmm0
+; X64-AVX512CD-NEXT: retq
;
-; AVX512VLCDBW-LABEL: test_mm512_epi64:
-; AVX512VLCDBW: # %bb.0: # %entry
-; AVX512VLCDBW-NEXT: vpcmpeqd %ymm1, %ymm0, %k0
-; AVX512VLCDBW-NEXT: vpbroadcastmb2q %k0, %zmm0
-; AVX512VLCDBW-NEXT: retq
+; X86-AVX512CD-LABEL: test_mm512_epi64:
+; X86-AVX512CD: # %bb.0: # %entry
+; X86-AVX512CD-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
+; X86-AVX512CD-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; X86-AVX512CD-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
+; X86-AVX512CD-NEXT: kmovw %k0, %eax
+; X86-AVX512CD-NEXT: movzbl %al, %eax
+; X86-AVX512CD-NEXT: vmovd %eax, %xmm0
+; X86-AVX512CD-NEXT: vpbroadcastq %xmm0, %zmm0
+; X86-AVX512CD-NEXT: retl
+;
+; X64-AVX512VLCDBW-LABEL: test_mm512_epi64:
+; X64-AVX512VLCDBW: # %bb.0: # %entry
+; X64-AVX512VLCDBW-NEXT: vpcmpeqd %ymm1, %ymm0, %k0
+; X64-AVX512VLCDBW-NEXT: vpbroadcastmb2q %k0, %zmm0
+; X64-AVX512VLCDBW-NEXT: retq
;
; X86-AVX512VLCDBW-LABEL: test_mm512_epi64:
; X86-AVX512VLCDBW: # %bb.0: # %entry
@@ -116,22 +134,33 @@ entry:
}
define <4 x i64> @test_mm256_epi64(<8 x i32> %a, <8 x i32> %b) {
-; AVX512CD-LABEL: test_mm256_epi64:
-; AVX512CD: # %bb.0: # %entry
-; AVX512CD-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
-; AVX512CD-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
-; AVX512CD-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
-; AVX512CD-NEXT: kmovw %k0, %eax
-; AVX512CD-NEXT: movzbl %al, %eax
-; AVX512CD-NEXT: vmovq %rax, %xmm0
-; AVX512CD-NEXT: vpbroadcastq %xmm0, %ymm0
-; AVX512CD-NEXT: retq
+; X64-AVX512CD-LABEL: test_mm256_epi64:
+; X64-AVX512CD: # %bb.0: # %entry
+; X64-AVX512CD-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
+; X64-AVX512CD-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; X64-AVX512CD-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
+; X64-AVX512CD-NEXT: kmovw %k0, %eax
+; X64-AVX512CD-NEXT: movzbl %al, %eax
+; X64-AVX512CD-NEXT: vmovq %rax, %xmm0
+; X64-AVX512CD-NEXT: vpbroadcastq %xmm0, %ymm0
+; X64-AVX512CD-NEXT: retq
;
-; AVX512VLCDBW-LABEL: test_mm256_epi64:
-; AVX512VLCDBW: # %bb.0: # %entry
-; AVX512VLCDBW-NEXT: vpcmpeqd %ymm1, %ymm0, %k0
-; AVX512VLCDBW-NEXT: vpbroadcastmb2q %k0, %ymm0
-; AVX512VLCDBW-NEXT: retq
+; X86-AVX512CD-LABEL: test_mm256_epi64:
+; X86-AVX512CD: # %bb.0: # %entry
+; X86-AVX512CD-NEXT: # kill: def $ymm1 killed $ymm1 def $zmm1
+; X86-AVX512CD-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
+; X86-AVX512CD-NEXT: vpcmpeqd %zmm1, %zmm0, %k0
+; X86-AVX512CD-NEXT: kmovw %k0, %eax
+; X86-AVX512CD-NEXT: movzbl %al, %eax
+; X86-AVX512CD-NEXT: vmovd %eax, %xmm0
+; X86-AVX512CD-NEXT: vpbroadcastq %xmm0, %ymm0
+; X86-AVX512CD-NEXT: retl
+;
+; X64-AVX512VLCDBW-LABEL: test_mm256_epi64:
+; X64-AVX512VLCDBW: # %bb.0: # %entry
+; X64-AVX512VLCDBW-NEXT: vpcmpeqd %ymm1, %ymm0, %k0
+; X64-AVX512VLCDBW-NEXT: vpbroadcastmb2q %k0, %ymm0
+; X64-AVX512VLCDBW-NEXT: retq
;
; X86-AVX512VLCDBW-LABEL: test_mm256_epi64:
; X86-AVX512VLCDBW: # %bb.0: # %entry
@@ -159,19 +188,13 @@ define <8 x i32> @test_mm256_epi32(<16 x i16> %a, <16 x i16> %b) {
; AVX512CD-NEXT: kmovw %k0, %eax
; AVX512CD-NEXT: vmovd %eax, %xmm0
; AVX512CD-NEXT: vpbroadcastd %xmm0, %ymm0
-; AVX512CD-NEXT: retq
+; AVX512CD-NEXT: ret{{[l|q]}}
;
; AVX512VLCDBW-LABEL: test_mm256_epi32:
; AVX512VLCDBW: # %bb.0: # %entry
; AVX512VLCDBW-NEXT: vpcmpeqw %ymm1, %ymm0, %k0
; AVX512VLCDBW-NEXT: vpbroadcastmw2d %k0, %ymm0
-; AVX512VLCDBW-NEXT: retq
-;
-; X86-AVX512VLCDBW-LABEL: test_mm256_epi32:
-; X86-AVX512VLCDBW: # %bb.0: # %entry
-; X86-AVX512VLCDBW-NEXT: vpcmpeqw %ymm1, %ymm0, %k0
-; X86-AVX512VLCDBW-NEXT: vpbroadcastmw2d %k0, %ymm0
-; X86-AVX512VLCDBW-NEXT: retl
+; AVX512VLCDBW-NEXT: ret{{[l|q]}}
entry:
%0 = icmp eq <16 x i16> %a, %b
%1 = bitcast <16 x i1> %0 to i16
More information about the llvm-commits
mailing list