[llvm] cf3a093 - [X86] Enable fast variable per-lane shuffle tuning on all Ryzen targets (PR44795)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 08:20:30 PDT 2022
Author: Simon Pilgrim
Date: 2022-04-07T16:00:52+01:00
New Revision: cf3a09369a29eb24b66153f0154237a04555ff12
URL: https://github.com/llvm/llvm-project/commit/cf3a09369a29eb24b66153f0154237a04555ff12
DIFF: https://github.com/llvm/llvm-project/commit/cf3a09369a29eb24b66153f0154237a04555ff12.diff
LOG: [X86] Enable fast variable per-lane shuffle tuning on all Ryzen targets (PR44795)
rGa3b8695bf592 enabled this for znver3, but AMD SoG, Agner and uops.info all agree that even znver1 has a fast per-lane shuffle op (VPSHUFB), but cross-lane shuffles seem to be slow (PERMPS etc.)
Fixes #44140
Differential Revision: https://reviews.llvm.org/D123306
Added:
Modified:
llvm/lib/Target/X86/X86.td
llvm/test/CodeGen/X86/vector-shuffle-fast-per-lane.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td
index d688d3c21cc70..60c662517d5d0 100644
--- a/llvm/lib/Target/X86/X86.td
+++ b/llvm/lib/Target/X86/X86.td
@@ -1193,6 +1193,7 @@ def ProcessorFeatures {
TuningFastScalarFSQRT,
TuningFastVectorFSQRT,
TuningFastScalarShiftMasks,
+ TuningFastVariablePerLaneShuffle,
TuningFastMOVBE,
TuningSlowSHLD,
TuningSBBDepBreaking,
@@ -1208,9 +1209,7 @@ def ProcessorFeatures {
FeaturePKU,
FeatureVAES,
FeatureVPCLMULQDQ];
- list<SubtargetFeature> ZN3AdditionalTuning =
- [TuningMacroFusion,
- TuningFastVariablePerLaneShuffle];
+ list<SubtargetFeature> ZN3AdditionalTuning = [TuningMacroFusion];
list<SubtargetFeature> ZN3Tuning =
!listconcat(ZN2Tuning, ZN3AdditionalTuning);
list<SubtargetFeature> ZN3Features =
diff --git a/llvm/test/CodeGen/X86/vector-shuffle-fast-per-lane.ll b/llvm/test/CodeGen/X86/vector-shuffle-fast-per-lane.ll
index 00b0796c10767..001eaf353b018 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-fast-per-lane.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-fast-per-lane.ll
@@ -4,8 +4,8 @@
; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx2,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=FAST
; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx512f,+fast-variable-perlane-shuffle | FileCheck %s --check-prefixes=FAST
;
-; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=znver1 | FileCheck %s --check-prefixes=SLOW
-; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=znver2 | FileCheck %s --check-prefixes=SLOW
+; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=znver1 | FileCheck %s --check-prefixes=FAST
+; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=znver2 | FileCheck %s --check-prefixes=FAST
; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=znver3 | FileCheck %s --check-prefixes=FAST
; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=haswell | FileCheck %s --check-prefixes=FAST
; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=skx | FileCheck %s --check-prefixes=FAST
More information about the llvm-commits
mailing list