[llvm] fac1729 - [X86] lowerV64I8Shuffle - don't use lowerShuffleWithPERMV until we've tried simpler options
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 10:15:38 PDT 2022
Author: Simon Pilgrim
Date: 2022-03-31T18:05:51+01:00
New Revision: fac17299243b8bf87266aa47984b398ce72089f2
URL: https://github.com/llvm/llvm-project/commit/fac17299243b8bf87266aa47984b398ce72089f2
DIFF: https://github.com/llvm/llvm-project/commit/fac17299243b8bf87266aa47984b398ce72089f2.diff
LOG: [X86] lowerV64I8Shuffle - don't use lowerShuffleWithPERMV until we've tried simpler options
Shuffle combining will still lower to this with better fast cross lane checks.
Noticed while triaging Issue #54658
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 80fec0a54ef69..a8c43895e7850 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -18699,10 +18699,6 @@ static SDValue lowerV64I8Shuffle(const SDLoc &DL, ArrayRef<int> Mask,
Zeroable, Subtarget, DAG))
return PSHUFB;
- // VBMI can use VPERMV/VPERMV3 byte shuffles.
- if (Subtarget.hasVBMI())
- return lowerShuffleWithPERMV(DL, MVT::v64i8, Mask, V1, V2, Subtarget, DAG);
-
// Try to create an in-lane repeating shuffle mask and then shuffle the
// results into the target lanes.
if (SDValue V = lowerShuffleAsRepeatedMaskAndLanePermute(
@@ -18724,6 +18720,10 @@ static SDValue lowerV64I8Shuffle(const SDLoc &DL, ArrayRef<int> Mask,
DL, MVT::v64i8, V1, V2, Mask, Subtarget, DAG))
return Result;
+ // VBMI can use VPERMV/VPERMV3 byte shuffles.
+ if (Subtarget.hasVBMI())
+ return lowerShuffleWithPERMV(DL, MVT::v64i8, Mask, V1, V2, Subtarget, DAG);
+
// FIXME: Implement direct support for this type!
return splitAndLowerShuffle(DL, MVT::v64i8, V1, V2, Mask, DAG);
}
More information about the llvm-commits
mailing list