[llvm] a72bcda - [X86] add test coverage for #143606
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 11 00:26:55 PDT 2025
Author: Simon Pilgrim
Date: 2025-06-11T08:26:36+01:00
New Revision: a72bcda1434c72f9db6687565a361479e0dde572
URL: https://github.com/llvm/llvm-project/commit/a72bcda1434c72f9db6687565a361479e0dde572
DIFF: https://github.com/llvm/llvm-project/commit/a72bcda1434c72f9db6687565a361479e0dde572.diff
LOG: [X86] add test coverage for #143606
Added:
Modified:
llvm/test/CodeGen/X86/vector-shuffle-combining-avx512vl.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-combining-avx512vl.ll b/llvm/test/CodeGen/X86/vector-shuffle-combining-avx512vl.ll
index 15c82f169c86e..d5aa7588925d8 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-combining-avx512vl.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-combining-avx512vl.ll
@@ -137,3 +137,31 @@ define void @PR142995(ptr %p0, ptr %p1, ptr %p2) nounwind #0 {
}
declare <5 x i32> @llvm.masked.load.v5i32.p0(ptr captures(none), i32 immarg, <5 x i1>, <5 x i32>)
declare <64 x i32> @llvm.masked.load.v64i32.p0(ptr captures(none), i32 immarg, <64 x i1>, <64 x i32>)
+
+define <8 x double> @PR143606(ptr %px, ptr %py) {
+; X86-LABEL: PR143606:
+; X86: # %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
+; X86-NEXT: vmovapd (%ecx), %ymm0
+; X86-NEXT: vblendpd {{.*#+}} ymm1 = ymm0[0],mem[1,2],ymm0[3]
+; X86-NEXT: vshufpd {{.*#+}} ymm0 = ymm0[1],mem[0],ymm0[2],mem[3]
+; X86-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
+; X86-NEXT: retl
+;
+; X64-LABEL: PR143606:
+; X64: # %bb.0:
+; X64-NEXT: vmovapd (%rdi), %ymm0
+; X64-NEXT: vblendpd {{.*#+}} ymm1 = ymm0[0],mem[1,2],ymm0[3]
+; X64-NEXT: vshufpd {{.*#+}} ymm0 = ymm0[1],mem[0],ymm0[2],mem[3]
+; X64-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
+; X64-NEXT: retq
+ %x = load <4 x double>, ptr %px, align 32
+ %y.lo = load <4 x double>, ptr %py, align 32
+ %py.hi = getelementptr inbounds nuw i8, ptr %py, i64 32
+ %y.hi = load <4 x double>, ptr %py.hi, align 32
+ %lo = shufflevector <4 x double> %x, <4 x double> %y.lo, <4 x i32> <i32 0, i32 5, i32 6, i32 3>
+ %hi = call <4 x double> @llvm.x86.avx512.vpermi2var.pd.256(<4 x double> %x, <4 x i64> <i64 1, i64 4, i64 2, i64 7>, <4 x double> %y.hi)
+ %res = shufflevector <4 x double> %lo, <4 x double> %hi, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+ ret <8 x double> %res
+}
More information about the llvm-commits
mailing list