[llvm] [X86] combineConcatVectorOps - extend ISD::VECTOR_SHUFFLE handling to support 512-bit types (PR #131189)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 13 11:50:36 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-x86
Author: Simon Pilgrim (RKSimon)
<details>
<summary>Changes</summary>
Limit cases to AVX512 targets that support two-operand crosslane shuffles
---
Patch is 40.91 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/131189.diff
3 Files Affected:
- (modified) llvm/lib/Target/X86/X86ISelLowering.cpp (+8-4)
- (modified) llvm/test/CodeGen/X86/matrix-multiply.ll (+137-549)
- (modified) llvm/test/CodeGen/X86/x86-interleaved-access.ll (+14-16)
``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 2f8bfe62277cd..4401d56dca531 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -57984,10 +57984,14 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
switch (Op0.getOpcode()) {
case ISD::VECTOR_SHUFFLE: {
- // TODO: Relax VBMI requirement for repeated shuffle ops - currently
- // limited to targets that should always have good cross lane shuffles.
- if (!IsSplat && NumOps == 2 && VT.is256BitVector() &&
- (EltSizeInBits >= 32 || Subtarget.hasInt256())) {
+ // TODO: Generalize NumOps support.
+ if (!IsSplat && NumOps == 2 &&
+ ((VT.is256BitVector() &&
+ (EltSizeInBits >= 32 || Subtarget.hasInt256())) ||
+ (VT.is512BitVector() && Subtarget.useAVX512Regs() &&
+ (EltSizeInBits >= 32 || Subtarget.hasVBMI2())))) {
+ // TODO: Relax VBMI requirement for repeated shuffle ops - currently
+ // limited to targets that should always have good cross lane shuffles.
SDValue Concat0 = CombineSubOperand(VT, Ops, 0);
SDValue Concat1 = CombineSubOperand(VT, Ops, 1);
if (Concat0 || Concat1 ||
diff --git a/llvm/test/CodeGen/X86/matrix-multiply.ll b/llvm/test/CodeGen/X86/matrix-multiply.ll
index d723ec849f328..9763893d3daa2 100644
--- a/llvm/test/CodeGen/X86/matrix-multiply.ll
+++ b/llvm/test/CodeGen/X86/matrix-multiply.ll
@@ -1351,35 +1351,28 @@ define <16 x double> @test_mul4x4_f64(<16 x double> %a0, <16 x double> %a1) noun
;
; AVX512-LABEL: test_mul4x4_f64:
; AVX512: # %bb.0: # %entry
-; AVX512-NEXT: vbroadcastsd %xmm2, %ymm4
-; AVX512-NEXT: vmulpd %ymm4, %ymm0, %ymm4
-; AVX512-NEXT: vextractf64x4 $1, %zmm2, %ymm5
-; AVX512-NEXT: vbroadcastsd %xmm5, %ymm5
-; AVX512-NEXT: vmulpd %ymm5, %ymm0, %ymm5
-; AVX512-NEXT: vbroadcastsd %xmm3, %ymm6
-; AVX512-NEXT: vmulpd %ymm6, %ymm0, %ymm6
-; AVX512-NEXT: vextractf64x4 $1, %zmm3, %ymm7
-; AVX512-NEXT: vbroadcastsd %xmm7, %ymm7
-; AVX512-NEXT: vmulpd %ymm7, %ymm0, %ymm7
-; AVX512-NEXT: vinsertf64x4 $1, %ymm5, %zmm4, %zmm4
-; AVX512-NEXT: vpermpd {{.*#+}} zmm5 = zmm2[1,1,1,1,5,5,5,5]
-; AVX512-NEXT: vshuff64x2 {{.*#+}} zmm8 = zmm0[4,5,6,7,4,5,6,7]
-; AVX512-NEXT: vmulpd %zmm5, %zmm8, %zmm0
-; AVX512-NEXT: vaddpd %zmm0, %zmm4, %zmm0
-; AVX512-NEXT: vinsertf64x4 $1, %ymm1, %zmm1, %zmm4
-; AVX512-NEXT: vpermpd {{.*#+}} zmm5 = zmm2[2,2,2,2,6,6,6,6]
-; AVX512-NEXT: vmulpd %zmm5, %zmm4, %zmm5
-; AVX512-NEXT: vaddpd %zmm5, %zmm0, %zmm0
+; AVX512-NEXT: vpermpd {{.*#+}} zmm4 = zmm2[1,1,1,1,5,5,5,5]
+; AVX512-NEXT: vshuff64x2 {{.*#+}} zmm5 = zmm0[4,5,6,7,4,5,6,7]
+; AVX512-NEXT: vmulpd %zmm4, %zmm5, %zmm4
+; AVX512-NEXT: vpermpd {{.*#+}} zmm6 = zmm2[0,0,0,0,4,4,4,4]
+; AVX512-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm7
+; AVX512-NEXT: vmulpd %zmm6, %zmm7, %zmm0
+; AVX512-NEXT: vaddpd %zmm4, %zmm0, %zmm0
+; AVX512-NEXT: vpermpd {{.*#+}} zmm4 = zmm2[2,2,2,2,6,6,6,6]
+; AVX512-NEXT: vinsertf64x4 $1, %ymm1, %zmm1, %zmm6
+; AVX512-NEXT: vmulpd %zmm4, %zmm6, %zmm4
+; AVX512-NEXT: vaddpd %zmm4, %zmm0, %zmm0
; AVX512-NEXT: vpermpd {{.*#+}} zmm2 = zmm2[3,3,3,3,7,7,7,7]
; AVX512-NEXT: vshuff64x2 {{.*#+}} zmm1 = zmm1[4,5,6,7,4,5,6,7]
; AVX512-NEXT: vmulpd %zmm2, %zmm1, %zmm2
; AVX512-NEXT: vaddpd %zmm2, %zmm0, %zmm0
-; AVX512-NEXT: vinsertf64x4 $1, %ymm7, %zmm6, %zmm2
-; AVX512-NEXT: vpermpd {{.*#+}} zmm5 = zmm3[1,1,1,1,5,5,5,5]
-; AVX512-NEXT: vmulpd %zmm5, %zmm8, %zmm5
-; AVX512-NEXT: vaddpd %zmm5, %zmm2, %zmm2
-; AVX512-NEXT: vpermpd {{.*#+}} zmm5 = zmm3[2,2,2,2,6,6,6,6]
-; AVX512-NEXT: vmulpd %zmm5, %zmm4, %zmm4
+; AVX512-NEXT: vpermpd {{.*#+}} zmm2 = zmm3[1,1,1,1,5,5,5,5]
+; AVX512-NEXT: vmulpd %zmm2, %zmm5, %zmm2
+; AVX512-NEXT: vpermpd {{.*#+}} zmm4 = zmm3[0,0,0,0,4,4,4,4]
+; AVX512-NEXT: vmulpd %zmm4, %zmm7, %zmm4
+; AVX512-NEXT: vaddpd %zmm2, %zmm4, %zmm2
+; AVX512-NEXT: vpermpd {{.*#+}} zmm4 = zmm3[2,2,2,2,6,6,6,6]
+; AVX512-NEXT: vmulpd %zmm4, %zmm6, %zmm4
; AVX512-NEXT: vaddpd %zmm4, %zmm2, %zmm2
; AVX512-NEXT: vpermpd {{.*#+}} zmm3 = zmm3[3,3,3,3,7,7,7,7]
; AVX512-NEXT: vmulpd %zmm3, %zmm1, %zmm1
@@ -2156,530 +2149,125 @@ define <64 x float> @test_mul8x8_f32(<64 x float> %a0, <64 x float> %a1) nounwin
; AVX1OR2-NEXT: vzeroupper
; AVX1OR2-NEXT: retq
;
-; AVX512F-LABEL: test_mul8x8_f32:
-; AVX512F: # %bb.0: # %entry
-; AVX512F-NEXT: vextractf64x4 $1, %zmm0, %ymm11
-; AVX512F-NEXT: vextractf64x4 $1, %zmm1, %ymm10
-; AVX512F-NEXT: vextractf64x4 $1, %zmm2, %ymm9
-; AVX512F-NEXT: vextractf64x4 $1, %zmm3, %ymm8
-; AVX512F-NEXT: vbroadcastss %xmm4, %ymm12
-; AVX512F-NEXT: vmulps %ymm0, %ymm12, %ymm12
-; AVX512F-NEXT: vmovshdup {{.*#+}} xmm13 = xmm4[1,1,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm13, %ymm13
-; AVX512F-NEXT: vmulps %ymm13, %ymm11, %ymm13
-; AVX512F-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512F-NEXT: vshufpd {{.*#+}} xmm13 = xmm4[1,0]
-; AVX512F-NEXT: vbroadcastss %xmm13, %ymm13
-; AVX512F-NEXT: vmulps %ymm1, %ymm13, %ymm13
-; AVX512F-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} xmm13 = xmm4[3,3,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm13, %ymm13
-; AVX512F-NEXT: vmulps %ymm13, %ymm10, %ymm13
-; AVX512F-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512F-NEXT: vextractf128 $1, %ymm4, %xmm13
-; AVX512F-NEXT: vbroadcastss %xmm13, %ymm13
-; AVX512F-NEXT: vmulps %ymm2, %ymm13, %ymm13
-; AVX512F-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512F-NEXT: vmovshdup {{.*#+}} ymm13 = ymm4[1,1,3,3,5,5,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm13 = ymm13[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm13, %ymm9, %ymm13
-; AVX512F-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} ymm13 = ymm4[2,2,2,2,6,6,6,6]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm13 = ymm13[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm3, %ymm13, %ymm13
-; AVX512F-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} ymm13 = ymm4[3,3,3,3,7,7,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm13 = ymm13[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm13, %ymm8, %ymm13
-; AVX512F-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512F-NEXT: vmovups %zmm12, {{[-0-9]+}}(%r{{[sb]}}p) # 64-byte Spill
-; AVX512F-NEXT: vextractf64x4 $1, %zmm4, %ymm13
-; AVX512F-NEXT: vextractf32x4 $2, %zmm4, %xmm14
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm0, %ymm14, %ymm14
-; AVX512F-NEXT: vmovshdup {{.*#+}} xmm15 = xmm13[1,1,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm15, %ymm11, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm14, %ymm14
-; AVX512F-NEXT: vshufps {{.*#+}} xmm15 = xmm13[2,2,2,2]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm1, %ymm15, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm14, %ymm14
-; AVX512F-NEXT: vshufps {{.*#+}} xmm15 = xmm13[3,3,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm15, %ymm10, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm14, %ymm14
-; AVX512F-NEXT: vextractf32x4 $3, %zmm4, %xmm4
-; AVX512F-NEXT: vbroadcastss %xmm4, %ymm4
-; AVX512F-NEXT: vmulps %ymm4, %ymm2, %ymm4
-; AVX512F-NEXT: vaddps %ymm4, %ymm14, %ymm4
-; AVX512F-NEXT: vmovshdup {{.*#+}} ymm14 = ymm13[1,1,3,3,5,5,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm14 = ymm14[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm14, %ymm9, %ymm14
-; AVX512F-NEXT: vaddps %ymm4, %ymm14, %ymm4
-; AVX512F-NEXT: vshufps {{.*#+}} ymm14 = ymm13[2,2,2,2,6,6,6,6]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm14 = ymm14[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm3, %ymm14, %ymm14
-; AVX512F-NEXT: vaddps %ymm4, %ymm14, %ymm4
-; AVX512F-NEXT: vshufps {{.*#+}} ymm13 = ymm13[3,3,3,3,7,7,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm13 = ymm13[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm13, %ymm8, %ymm13
-; AVX512F-NEXT: vaddps %ymm4, %ymm13, %ymm4
-; AVX512F-NEXT: vmovups %ymm4, {{[-0-9]+}}(%r{{[sb]}}p) # 32-byte Spill
-; AVX512F-NEXT: vbroadcastss %xmm5, %ymm13
-; AVX512F-NEXT: vmulps %ymm0, %ymm13, %ymm13
-; AVX512F-NEXT: vmovshdup {{.*#+}} xmm14 = xmm5[1,1,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm14, %ymm11, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm13, %ymm13
-; AVX512F-NEXT: vshufpd {{.*#+}} xmm14 = xmm5[1,0]
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm1, %ymm14, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm13, %ymm13
-; AVX512F-NEXT: vshufps {{.*#+}} xmm14 = xmm5[3,3,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm14, %ymm10, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm13, %ymm13
-; AVX512F-NEXT: vextractf128 $1, %ymm5, %xmm14
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm2, %ymm14, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm13, %ymm13
-; AVX512F-NEXT: vmovshdup {{.*#+}} ymm14 = ymm5[1,1,3,3,5,5,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm14 = ymm14[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm14, %ymm9, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm13, %ymm13
-; AVX512F-NEXT: vshufps {{.*#+}} ymm14 = ymm5[2,2,2,2,6,6,6,6]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm14 = ymm14[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm3, %ymm14, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm13, %ymm13
-; AVX512F-NEXT: vshufps {{.*#+}} ymm14 = ymm5[3,3,3,3,7,7,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm14 = ymm14[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm14, %ymm8, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm13, %ymm13
-; AVX512F-NEXT: vextractf64x4 $1, %zmm5, %ymm14
-; AVX512F-NEXT: vextractf32x4 $2, %zmm5, %xmm15
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm0, %ymm15, %ymm15
-; AVX512F-NEXT: vmovshdup {{.*#+}} xmm12 = xmm14[1,1,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm12, %ymm12
-; AVX512F-NEXT: vmulps %ymm12, %ymm11, %ymm12
-; AVX512F-NEXT: vaddps %ymm12, %ymm15, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} xmm15 = xmm14[2,2,2,2]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm1, %ymm15, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} xmm15 = xmm14[3,3,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm15, %ymm10, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vextractf32x4 $3, %zmm5, %xmm5
-; AVX512F-NEXT: vbroadcastss %xmm5, %ymm5
-; AVX512F-NEXT: vmulps %ymm5, %ymm2, %ymm5
-; AVX512F-NEXT: vaddps %ymm5, %ymm12, %ymm5
-; AVX512F-NEXT: vmovshdup {{.*#+}} ymm12 = ymm14[1,1,3,3,5,5,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm12 = ymm12[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm12, %ymm9, %ymm12
-; AVX512F-NEXT: vaddps %ymm5, %ymm12, %ymm5
-; AVX512F-NEXT: vshufps {{.*#+}} ymm12 = ymm14[2,2,2,2,6,6,6,6]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm12 = ymm12[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm3, %ymm12, %ymm12
-; AVX512F-NEXT: vaddps %ymm5, %ymm12, %ymm5
-; AVX512F-NEXT: vshufps {{.*#+}} ymm12 = ymm14[3,3,3,3,7,7,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm12 = ymm12[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm12, %ymm8, %ymm12
-; AVX512F-NEXT: vaddps %ymm5, %ymm12, %ymm5
-; AVX512F-NEXT: vbroadcastss %xmm6, %ymm12
-; AVX512F-NEXT: vmulps %ymm0, %ymm12, %ymm12
-; AVX512F-NEXT: vmovshdup {{.*#+}} xmm14 = xmm6[1,1,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm14, %ymm11, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm12, %ymm12
-; AVX512F-NEXT: vshufpd {{.*#+}} xmm14 = xmm6[1,0]
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm1, %ymm14, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} xmm14 = xmm6[3,3,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm14, %ymm10, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm12, %ymm12
-; AVX512F-NEXT: vextractf128 $1, %ymm6, %xmm14
-; AVX512F-NEXT: vbroadcastss %xmm14, %ymm14
-; AVX512F-NEXT: vmulps %ymm2, %ymm14, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm12, %ymm12
-; AVX512F-NEXT: vmovshdup {{.*#+}} ymm14 = ymm6[1,1,3,3,5,5,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm14 = ymm14[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm14, %ymm9, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} ymm14 = ymm6[2,2,2,2,6,6,6,6]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm14 = ymm14[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm3, %ymm14, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} ymm14 = ymm6[3,3,3,3,7,7,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm14 = ymm14[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm14, %ymm8, %ymm14
-; AVX512F-NEXT: vaddps %ymm14, %ymm12, %ymm14
-; AVX512F-NEXT: vextractf32x4 $2, %zmm6, %xmm12
-; AVX512F-NEXT: vbroadcastss %xmm12, %ymm12
-; AVX512F-NEXT: vmulps %ymm0, %ymm12, %ymm12
-; AVX512F-NEXT: vextractf64x4 $1, %zmm6, %ymm15
-; AVX512F-NEXT: vmovshdup {{.*#+}} xmm4 = xmm15[1,1,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm4, %ymm4
-; AVX512F-NEXT: vmulps %ymm4, %ymm11, %ymm4
-; AVX512F-NEXT: vaddps %ymm4, %ymm12, %ymm4
-; AVX512F-NEXT: vshufps {{.*#+}} xmm12 = xmm15[2,2,2,2]
-; AVX512F-NEXT: vbroadcastss %xmm12, %ymm12
-; AVX512F-NEXT: vmulps %ymm1, %ymm12, %ymm12
-; AVX512F-NEXT: vaddps %ymm4, %ymm12, %ymm4
-; AVX512F-NEXT: vshufps {{.*#+}} xmm12 = xmm15[3,3,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm12, %ymm12
-; AVX512F-NEXT: vmulps %ymm12, %ymm10, %ymm12
-; AVX512F-NEXT: vaddps %ymm4, %ymm12, %ymm4
-; AVX512F-NEXT: vextractf32x4 $3, %zmm6, %xmm6
-; AVX512F-NEXT: vbroadcastss %xmm6, %ymm6
-; AVX512F-NEXT: vmulps %ymm6, %ymm2, %ymm6
-; AVX512F-NEXT: vaddps %ymm6, %ymm4, %ymm4
-; AVX512F-NEXT: vmovshdup {{.*#+}} ymm6 = ymm15[1,1,3,3,5,5,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm6 = ymm6[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm6, %ymm9, %ymm6
-; AVX512F-NEXT: vaddps %ymm6, %ymm4, %ymm4
-; AVX512F-NEXT: vshufps {{.*#+}} ymm6 = ymm15[2,2,2,2,6,6,6,6]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm6 = ymm6[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm6, %ymm3, %ymm6
-; AVX512F-NEXT: vaddps %ymm6, %ymm4, %ymm4
-; AVX512F-NEXT: vshufps {{.*#+}} ymm6 = ymm15[3,3,3,3,7,7,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm6 = ymm6[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm6, %ymm8, %ymm6
-; AVX512F-NEXT: vaddps %ymm6, %ymm4, %ymm6
-; AVX512F-NEXT: vmovups {{[-0-9]+}}(%r{{[sb]}}p), %zmm4 # 64-byte Reload
-; AVX512F-NEXT: vinsertf64x4 $1, {{[-0-9]+}}(%r{{[sb]}}p), %zmm4, %zmm4 # 32-byte Folded Reload
-; AVX512F-NEXT: vbroadcastss %xmm7, %ymm12
-; AVX512F-NEXT: vmulps %ymm0, %ymm12, %ymm12
-; AVX512F-NEXT: vmovshdup {{.*#+}} xmm15 = xmm7[1,1,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm15, %ymm11, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vshufpd {{.*#+}} xmm15 = xmm7[1,0]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm1, %ymm15, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} xmm15 = xmm7[3,3,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm15, %ymm10, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vextractf128 $1, %ymm7, %xmm15
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm2, %ymm15, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vmovshdup {{.*#+}} ymm15 = ymm7[1,1,3,3,5,5,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm15 = ymm15[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm15, %ymm9, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} ymm15 = ymm7[2,2,2,2,6,6,6,6]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm15 = ymm15[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm3, %ymm15, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vshufps {{.*#+}} ymm15 = ymm7[3,3,3,3,7,7,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm15 = ymm15[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm15, %ymm8, %ymm15
-; AVX512F-NEXT: vaddps %ymm15, %ymm12, %ymm12
-; AVX512F-NEXT: vinsertf64x4 $1, %ymm5, %zmm13, %zmm5
-; AVX512F-NEXT: vextractf64x4 $1, %zmm7, %ymm13
-; AVX512F-NEXT: vextractf32x4 $2, %zmm7, %xmm15
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm0, %ymm15, %ymm0
-; AVX512F-NEXT: vmovshdup {{.*#+}} xmm15 = xmm13[1,1,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm15, %ymm15
-; AVX512F-NEXT: vmulps %ymm15, %ymm11, %ymm11
-; AVX512F-NEXT: vaddps %ymm0, %ymm11, %ymm0
-; AVX512F-NEXT: vshufps {{.*#+}} xmm11 = xmm13[2,2,2,2]
-; AVX512F-NEXT: vbroadcastss %xmm11, %ymm11
-; AVX512F-NEXT: vmulps %ymm1, %ymm11, %ymm1
-; AVX512F-NEXT: vaddps %ymm1, %ymm0, %ymm0
-; AVX512F-NEXT: vshufps {{.*#+}} xmm1 = xmm13[3,3,3,3]
-; AVX512F-NEXT: vbroadcastss %xmm1, %ymm1
-; AVX512F-NEXT: vmulps %ymm1, %ymm10, %ymm1
-; AVX512F-NEXT: vaddps %ymm1, %ymm0, %ymm0
-; AVX512F-NEXT: vextractf32x4 $3, %zmm7, %xmm1
-; AVX512F-NEXT: vbroadcastss %xmm1, %ymm1
-; AVX512F-NEXT: vmulps %ymm1, %ymm2, %ymm1
-; AVX512F-NEXT: vaddps %ymm1, %ymm0, %ymm0
-; AVX512F-NEXT: vmovshdup {{.*#+}} ymm1 = ymm13[1,1,3,3,5,5,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm1, %ymm9, %ymm1
-; AVX512F-NEXT: vaddps %ymm1, %ymm0, %ymm0
-; AVX512F-NEXT: vshufps {{.*#+}} ymm1 = ymm13[2,2,2,2,6,6,6,6]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm1, %ymm3, %ymm1
-; AVX512F-NEXT: vaddps %ymm1, %ymm0, %ymm0
-; AVX512F-NEXT: vshufps {{.*#+}} ymm1 = ymm13[3,3,3,3,7,7,7,7]
-; AVX512F-NEXT: vpermpd {{.*#+}} ymm1 = ymm1[2,2,2,2]
-; AVX512F-NEXT: vmulps %ymm1, %ymm8, %ymm1
-; AVX512F-NEXT: vaddps %ymm1, %ymm0, %ymm0
-; AVX512F-NEXT: vinsertf64x4 $1, %ymm6, %zmm14, %zmm2
-; AVX512F-NEXT: vinsertf64x4 $1, %ymm0, %zmm12, %zmm3
-; AVX512F-NEXT: vmovaps %zmm4, %zmm0
-; AVX512F-NEXT: vmovaps %zmm5, %zmm1
-; AVX512F-NEXT: retq
-;
-; AVX512VL-LABEL: test_mul8x8_f32:
-; AVX512VL: # %bb.0: # %entry
-; AVX512VL-NEXT: vextractf64x4 $1, %zmm0, %ymm11
-; AVX512VL-NEXT: vextractf64x4 $1, %zmm1, %ymm10
-; AVX512VL-NEXT: vextractf64x4 $1, %zmm2, %ymm9
-; AVX512VL-NEXT: vextractf64x4 $1, %zmm3, %ymm8
-; AVX512VL-NEXT: vbroadcastss %xmm4, %ymm12
-; AVX512VL-NEXT: vmulps %ymm0, %ymm12, %ymm12
-; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm13 = xmm4[1,1,3,3]
-; AVX512VL-NEXT: vbroadcastss %xmm13, %ymm13
-; AVX512VL-NEXT: vmulps %ymm13, %ymm11, %ymm13
-; AVX512VL-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512VL-NEXT: vshufpd {{.*#+}} xmm13 = xmm4[1,0]
-; AVX512VL-NEXT: vbroadcastss %xmm13, %ymm13
-; AVX512VL-NEXT: vmulps %ymm1, %ymm13, %ymm13
-; AVX512VL-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512VL-NEXT: vshufps {{.*#+}} xmm13 = xmm4[3,3,3,3]
-; AVX512VL-NEXT: vbroadcastss %xmm13, %ymm13
-; AVX512VL-NEXT: vmulps %ymm13, %ymm10, %ymm13
-; AVX512VL-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512VL-NEXT: vextractf128 $1, %ymm4, %xmm13
-; AVX512VL-NEXT: vbroadcastss %xmm13, %ymm13
-; AVX512VL-NEXT: vmulps %ymm2, %ymm13, %ymm13
-; AVX512VL-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512VL-NEXT: vmovshdup {{.*#+}} ymm13 = ymm4[1,1,3,3,5,5,7,7]
-; AVX512VL-NEXT: vpermpd {{.*#+}} ymm13 = ymm13[2,2,2,2]
-; AVX512VL-NEXT: vmulps %ymm13, %ymm9, %ymm13
-; AVX512VL-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512VL-NEXT: vshufps {{.*#+}} ymm13 = ymm4[2,2,2,2,6,6,6,6]
-; AVX512VL-NEXT: vpermpd {{.*#+}} ymm13 = ymm13[2,2,2,2]
-; AVX512VL-NEXT: vmulps %ymm3, %ymm13, %ymm13
-; AVX512VL-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512VL-NEXT: vshufps {{.*#+}} ymm13 = ymm4[3,3,3,3,7,7,7,7]
-; AVX512VL-NEXT: vpermpd {{.*#+}} ymm13 = ymm13[2,2,2,2]
-; AVX512VL-NEXT: vmulps %ymm13, %ymm8, %ymm13
-; AVX512VL-NEXT: vaddps %ymm13, %ymm12, %ymm12
-; AVX512VL-NEXT: vextractf64x4 $1, %zmm4, %ymm13
-; AVX512VL-NEXT: vextractf32x4 $2, %z...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/131189
More information about the llvm-commits
mailing list