[llvm] r279736 - [X86][AVX] Improved AVX512F/AVX512VL SubVectorBroadcast tests
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 05:50:13 PDT 2016
Author: rksimon
Date: Thu Aug 25 07:50:13 2016
New Revision: 279736
URL: http://llvm.org/viewvc/llvm-project?rev=279736&view=rev
Log:
[X86][AVX] Improved AVX512F/AVX512VL SubVectorBroadcast tests
Modified:
llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll
Modified: llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll?rev=279736&r1=279735&r2=279736&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll (original)
+++ llvm/trunk/test/CodeGen/X86/subvector-broadcast.ll Thu Aug 25 07:50:13 2016
@@ -1,12 +1,12 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx | FileCheck %s --check-prefix=X32 --check-prefix=X32-AVX --check-prefix=X32-AVX1
; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx2 | FileCheck %s --check-prefix=X32 --check-prefix=X32-AVX --check-prefix=X32-AVX2
-; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx512vl | FileCheck %s --check-prefix=X32 --check-prefix=X32-AVX512
+; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx512vl | FileCheck %s --check-prefix=X32 --check-prefix=X32-AVX512 --check-prefix=X32-AVX512F
; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx512bw,+avx512vl | FileCheck %s --check-prefix=X32 --check-prefix=X32-AVX512 --check-prefix=X32-AVX512BW
; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx512dq,+avx512vl | FileCheck %s --check-prefix=X32 --check-prefix=X32-AVX512 --check-prefix=X32-AVX512DQ
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx | FileCheck %s --check-prefix=X64 --check-prefix=X64-AVX --check-prefix=X64-AVX1
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx2 | FileCheck %s --check-prefix=X64 --check-prefix=X64-AVX --check-prefix=X64-AVX2
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512vl | FileCheck %s --check-prefix=X64 --check-prefix=X64-AVX512
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512vl | FileCheck %s --check-prefix=X64 --check-prefix=X64-AVX512 --check-prefix=X64-AVX512F
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512bw,+avx512vl | FileCheck %s --check-prefix=X64 --check-prefix=X64-AVX512 --check-prefix=X64-AVX512BW
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512dq,+avx512vl | FileCheck %s --check-prefix=X64 --check-prefix=X64-AVX512 --check-prefix=X64-AVX512DQ
@@ -21,6 +21,12 @@ define <4 x double> @test_broadcast_2f64
; X32-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_2f64_4f64:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vbroadcastf32x4 (%eax), %ymm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_2f64_4f64:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -38,6 +44,11 @@ define <4 x double> @test_broadcast_2f64
; X64-AVX-NEXT: vbroadcastf128 {{.*#+}} ymm0 = mem[0,1,0,1]
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_2f64_4f64:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vbroadcastf32x4 (%rdi), %ymm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_2f64_4f64:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vbroadcastf32x4 (%rdi), %ymm0
@@ -60,6 +71,13 @@ define <8 x double> @test_broadcast_2f64
; X32-AVX-NEXT: vmovdqa %ymm0, %ymm1
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_2f64_8f64:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vbroadcastf32x4 (%eax), %ymm0
+; X32-AVX512F-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_2f64_8f64:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -80,6 +98,12 @@ define <8 x double> @test_broadcast_2f64
; X64-AVX-NEXT: vmovdqa %ymm0, %ymm1
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_2f64_8f64:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vbroadcastf32x4 (%rdi), %ymm0
+; X64-AVX512F-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_2f64_8f64:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vbroadcastf32x4 (%rdi), %ymm0
@@ -140,6 +164,12 @@ define <4 x i64> @test_broadcast_2i64_4i
; X32-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
; X32-AVX2-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_2i64_4i64:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vbroadcasti32x4 (%eax), %ymm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_2i64_4i64:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -162,6 +192,11 @@ define <4 x i64> @test_broadcast_2i64_4i
; X64-AVX2-NEXT: vbroadcasti128 {{.*#+}} ymm0 = mem[0,1,0,1]
; X64-AVX2-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_2i64_4i64:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vbroadcasti32x4 (%rdi), %ymm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_2i64_4i64:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vbroadcasti32x4 (%rdi), %ymm0
@@ -191,6 +226,13 @@ define <8 x i64> @test_broadcast_2i64_8i
; X32-AVX2-NEXT: vmovdqa %ymm0, %ymm1
; X32-AVX2-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_2i64_8i64:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vbroadcasti32x4 (%eax), %ymm0
+; X32-AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_2i64_8i64:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -217,6 +259,12 @@ define <8 x i64> @test_broadcast_2i64_8i
; X64-AVX2-NEXT: vmovdqa %ymm0, %ymm1
; X64-AVX2-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_2i64_8i64:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vbroadcasti32x4 (%rdi), %ymm0
+; X64-AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_2i64_8i64:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vbroadcasti32x4 (%rdi), %ymm0
@@ -299,6 +347,13 @@ define <16 x float> @test_broadcast_4f32
; X32-AVX-NEXT: vmovdqa %ymm0, %ymm1
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_4f32_16f32:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vbroadcastf32x4 (%eax), %ymm0
+; X32-AVX512F-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_4f32_16f32:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -319,6 +374,12 @@ define <16 x float> @test_broadcast_4f32
; X64-AVX-NEXT: vmovdqa %ymm0, %ymm1
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_4f32_16f32:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vbroadcastf32x4 (%rdi), %ymm0
+; X64-AVX512F-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_4f32_16f32:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vbroadcastf32x4 (%rdi), %ymm0
@@ -343,6 +404,13 @@ define <16 x float> @test_broadcast_8f32
; X32-AVX-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_8f32_16f32:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vmovapd (%eax), %ymm0
+; X32-AVX512F-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_8f32_16f32:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -363,6 +431,12 @@ define <16 x float> @test_broadcast_8f32
; X64-AVX-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_8f32_16f32:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovapd (%rdi), %ymm0
+; X64-AVX512F-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_8f32_16f32:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovapd (%rdi), %ymm0
@@ -432,6 +506,13 @@ define <16 x i32> @test_broadcast_4i32_1
; X32-AVX2-NEXT: vmovdqa %ymm0, %ymm1
; X32-AVX2-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_4i32_16i32:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vbroadcasti32x4 (%eax), %ymm0
+; X32-AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_4i32_16i32:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -458,6 +539,12 @@ define <16 x i32> @test_broadcast_4i32_1
; X64-AVX2-NEXT: vmovdqa %ymm0, %ymm1
; X64-AVX2-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_4i32_16i32:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vbroadcasti32x4 (%rdi), %ymm0
+; X64-AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_4i32_16i32:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vbroadcasti32x4 (%rdi), %ymm0
@@ -482,6 +569,13 @@ define <16 x i32> @test_broadcast_8i32_1
; X32-AVX-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_8i32_16i32:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vmovdqa32 (%eax), %ymm0
+; X32-AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_8i32_16i32:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -502,6 +596,12 @@ define <16 x i32> @test_broadcast_8i32_1
; X64-AVX-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_8i32_16i32:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovdqa32 (%rdi), %ymm0
+; X64-AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_8i32_16i32:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovdqa32 (%rdi), %ymm0
@@ -571,6 +671,13 @@ define <32 x i16> @test_broadcast_8i16_3
; X32-AVX2-NEXT: vmovdqa %ymm0, %ymm1
; X32-AVX2-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_8i16_32i16:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vbroadcasti32x4 (%eax), %ymm0
+; X32-AVX512F-NEXT: vmovdqa64 %ymm0, %ymm1
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_8i16_32i16:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -597,6 +704,12 @@ define <32 x i16> @test_broadcast_8i16_3
; X64-AVX2-NEXT: vmovdqa %ymm0, %ymm1
; X64-AVX2-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_8i16_32i16:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vbroadcasti32x4 (%rdi), %ymm0
+; X64-AVX512F-NEXT: vmovdqa64 %ymm0, %ymm1
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_8i16_32i16:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vbroadcasti32x4 (%rdi), %ymm0
@@ -621,6 +734,13 @@ define <32 x i16> @test_broadcast_16i16_
; X32-AVX-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_16i16_32i16:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vmovaps (%eax), %ymm0
+; X32-AVX512F-NEXT: vmovaps %ymm0, %ymm1
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_16i16_32i16:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -641,6 +761,12 @@ define <32 x i16> @test_broadcast_16i16_
; X64-AVX-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_16i16_32i16:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovaps (%rdi), %ymm0
+; X64-AVX512F-NEXT: vmovaps %ymm0, %ymm1
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_16i16_32i16:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovdqu16 (%rdi), %ymm0
@@ -710,6 +836,13 @@ define <64 x i8> @test_broadcast_16i8_64
; X32-AVX2-NEXT: vmovdqa %ymm0, %ymm1
; X32-AVX2-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_16i8_64i8:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vbroadcasti32x4 (%eax), %ymm0
+; X32-AVX512F-NEXT: vmovdqa64 %ymm0, %ymm1
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_16i8_64i8:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -736,6 +869,12 @@ define <64 x i8> @test_broadcast_16i8_64
; X64-AVX2-NEXT: vmovdqa %ymm0, %ymm1
; X64-AVX2-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_16i8_64i8:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vbroadcasti32x4 (%rdi), %ymm0
+; X64-AVX512F-NEXT: vmovdqa64 %ymm0, %ymm1
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_16i8_64i8:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vbroadcasti32x4 (%rdi), %ymm0
@@ -760,6 +899,13 @@ define <64 x i8> @test_broadcast_32i8_64
; X32-AVX-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_32i8_64i8:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: vmovaps (%eax), %ymm0
+; X32-AVX512F-NEXT: vmovaps %ymm0, %ymm1
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_32i8_64i8:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -780,6 +926,12 @@ define <64 x i8> @test_broadcast_32i8_64
; X64-AVX-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_32i8_64i8:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovaps (%rdi), %ymm0
+; X64-AVX512F-NEXT: vmovaps %ymm0, %ymm1
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_32i8_64i8:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovdqu8 (%rdi), %ymm0
@@ -810,6 +962,15 @@ define <4 x double> @test_broadcast_2f64
; X32-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_2f64_4f64_reuse:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X32-AVX512F-NEXT: vmovaps (%ecx), %xmm0
+; X32-AVX512F-NEXT: vmovaps %xmm0, (%eax)
+; X32-AVX512F-NEXT: vinsertf32x4 $1, %xmm0, %ymm0, %ymm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_2f64_4f64_reuse:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -835,6 +996,13 @@ define <4 x double> @test_broadcast_2f64
; X64-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_2f64_4f64_reuse:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovaps (%rdi), %xmm0
+; X64-AVX512F-NEXT: vmovaps %xmm0, (%rsi)
+; X64-AVX512F-NEXT: vinsertf32x4 $1, %xmm0, %ymm0, %ymm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_2f64_4f64_reuse:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovaps (%rdi), %xmm0
@@ -864,6 +1032,15 @@ define <4 x i64> @test_broadcast_2i64_4i
; X32-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_2i64_4i64_reuse:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X32-AVX512F-NEXT: vmovdqa64 (%ecx), %xmm0
+; X32-AVX512F-NEXT: vmovdqa64 %xmm0, (%eax)
+; X32-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_2i64_4i64_reuse:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -889,6 +1066,13 @@ define <4 x i64> @test_broadcast_2i64_4i
; X64-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_2i64_4i64_reuse:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovdqa64 (%rdi), %xmm0
+; X64-AVX512F-NEXT: vmovdqa64 %xmm0, (%rsi)
+; X64-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_2i64_4i64_reuse:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovdqa64 (%rdi), %xmm0
@@ -994,6 +1178,15 @@ define <16 x i16> @test_broadcast_8i16_1
; X32-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_8i16_16i16_reuse:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X32-AVX512F-NEXT: vmovdqa64 (%ecx), %xmm0
+; X32-AVX512F-NEXT: vmovdqa32 %xmm0, (%eax)
+; X32-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_8i16_16i16_reuse:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1019,6 +1212,13 @@ define <16 x i16> @test_broadcast_8i16_1
; X64-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_8i16_16i16_reuse:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovdqa64 (%rdi), %xmm0
+; X64-AVX512F-NEXT: vmovdqa32 %xmm0, (%rsi)
+; X64-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_8i16_16i16_reuse:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovdqu16 (%rdi), %xmm0
@@ -1048,6 +1248,15 @@ define <32 x i8> @test_broadcast_16i8_32
; X32-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_16i8_32i8_reuse:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X32-AVX512F-NEXT: vmovdqa64 (%ecx), %xmm0
+; X32-AVX512F-NEXT: vmovdqa32 %xmm0, (%eax)
+; X32-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_16i8_32i8_reuse:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1073,6 +1282,13 @@ define <32 x i8> @test_broadcast_16i8_32
; X64-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_16i8_32i8_reuse:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovdqa64 (%rdi), %xmm0
+; X64-AVX512F-NEXT: vmovdqa32 %xmm0, (%rsi)
+; X64-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_16i8_32i8_reuse:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovdqu8 (%rdi), %xmm0
@@ -1107,6 +1323,16 @@ define <8 x i32> @test_broadcast_4i32_8i
; X32-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_4i32_8i32_chain:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X32-AVX512F-NEXT: vmovdqa64 (%ecx), %xmm0
+; X32-AVX512F-NEXT: vpxord %xmm1, %xmm1, %xmm1
+; X32-AVX512F-NEXT: vmovdqa32 %xmm1, (%eax)
+; X32-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_4i32_8i32_chain:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1135,6 +1361,14 @@ define <8 x i32> @test_broadcast_4i32_8i
; X64-AVX-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_4i32_8i32_chain:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovdqa64 (%rdi), %xmm0
+; X64-AVX512F-NEXT: vpxord %xmm1, %xmm1, %xmm1
+; X64-AVX512F-NEXT: vmovdqa32 %xmm1, (%rsi)
+; X64-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_4i32_8i32_chain:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovdqa64 (%rdi), %xmm0
@@ -1168,6 +1402,17 @@ define <16 x i32> @test_broadcast_4i32_1
; X32-AVX-NEXT: vmovaps %ymm0, %ymm1
; X32-AVX-NEXT: retl
;
+; X32-AVX512F-LABEL: test_broadcast_4i32_16i32_chain:
+; X32-AVX512F: ## BB#0:
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-AVX512F-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X32-AVX512F-NEXT: vmovdqa64 (%ecx), %xmm0
+; X32-AVX512F-NEXT: vpxord %xmm1, %xmm1, %xmm1
+; X32-AVX512F-NEXT: vmovdqa32 %xmm1, (%eax)
+; X32-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X32-AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
+; X32-AVX512F-NEXT: retl
+;
; X32-AVX512BW-LABEL: test_broadcast_4i32_16i32_chain:
; X32-AVX512BW: ## BB#0:
; X32-AVX512BW-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -1199,6 +1444,15 @@ define <16 x i32> @test_broadcast_4i32_1
; X64-AVX-NEXT: vmovaps %ymm0, %ymm1
; X64-AVX-NEXT: retq
;
+; X64-AVX512F-LABEL: test_broadcast_4i32_16i32_chain:
+; X64-AVX512F: ## BB#0:
+; X64-AVX512F-NEXT: vmovdqa64 (%rdi), %xmm0
+; X64-AVX512F-NEXT: vpxord %xmm1, %xmm1, %xmm1
+; X64-AVX512F-NEXT: vmovdqa32 %xmm1, (%rsi)
+; X64-AVX512F-NEXT: vinserti32x4 $1, %xmm0, %ymm0, %ymm0
+; X64-AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
+; X64-AVX512F-NEXT: retq
+;
; X64-AVX512BW-LABEL: test_broadcast_4i32_16i32_chain:
; X64-AVX512BW: ## BB#0:
; X64-AVX512BW-NEXT: vmovdqa64 (%rdi), %xmm0
More information about the llvm-commits
mailing list