[llvm] aa3fcb9 - [X86][AVX] Add extra vperm2f128+vpermilvar combine coverage
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 03:14:20 PDT 2020
Author: Simon Pilgrim
Date: 2020-09-07T10:58:53+01:00
New Revision: aa3fcb967110f2d448d241358cadc048954e6134
URL: https://github.com/llvm/llvm-project/commit/aa3fcb967110f2d448d241358cadc048954e6134
DIFF: https://github.com/llvm/llvm-project/commit/aa3fcb967110f2d448d241358cadc048954e6134.diff
LOG: [X86][AVX] Add extra vperm2f128+vpermilvar combine coverage
The existing test /should/ reduce to a vmovaps (concat xmm with zero upper).
Added:
Modified:
llvm/test/CodeGen/X86/vector-shuffle-combining-avx.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-combining-avx.ll b/llvm/test/CodeGen/X86/vector-shuffle-combining-avx.ll
index 6ffbe095c39b..d4ef76a2a9cf 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-combining-avx.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-combining-avx.ll
@@ -142,8 +142,19 @@ define <8 x float> @combine_vpermilvar_vperm2f128_zero_8f32(<8 x float> %a0) {
ret <8 x float> %3
}
-define <4 x double> @combine_vperm2f128_vpermilvar_as_vpblendpd(<4 x double> %a0) {
-; CHECK-LABEL: combine_vperm2f128_vpermilvar_as_vpblendpd:
+define <4 x double> @combine_vperm2f128_vpermilvar_as_vperm2f128(<4 x double> %a0) {
+; CHECK-LABEL: combine_vperm2f128_vpermilvar_as_vperm2f128:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vperm2f128 {{.*#+}} ymm0 = zero,zero,ymm0[0,1]
+; CHECK-NEXT: ret{{[l|q]}}
+ %1 = tail call <4 x double> @llvm.x86.avx.vpermilvar.pd.256(<4 x double> %a0, <4 x i64> <i64 2, i64 0, i64 2, i64 0>)
+ %2 = shufflevector <4 x double> %1, <4 x double> zeroinitializer, <4 x i32> <i32 4, i32 5, i32 0, i32 1>
+ %3 = tail call <4 x double> @llvm.x86.avx.vpermilvar.pd.256(<4 x double> %2, <4 x i64> <i64 2, i64 0, i64 2, i64 0>)
+ ret <4 x double> %3
+}
+
+define <4 x double> @combine_vperm2f128_vpermilvar_as_vmovaps(<4 x double> %a0) {
+; CHECK-LABEL: combine_vperm2f128_vpermilvar_as_vmovaps:
; CHECK: # %bb.0:
; CHECK-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
; CHECK-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2]
More information about the llvm-commits
mailing list