[llvm] dd5b489 - [CostModel][X86] getShuffleCost - treat SK_Splice as SK_PermuteTwoSrc
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 02:51:26 PDT 2022
Author: Simon Pilgrim
Date: 2022-08-22T10:51:08+01:00
New Revision: dd5b48976c353cf6344c38ac6e4caf6c6c50243a
URL: https://github.com/llvm/llvm-project/commit/dd5b48976c353cf6344c38ac6e4caf6c6c50243a
DIFF: https://github.com/llvm/llvm-project/commit/dd5b48976c353cf6344c38ac6e4caf6c6c50243a.diff
LOG: [CostModel][X86] getShuffleCost - treat SK_Splice as SK_PermuteTwoSrc
SK_Splice should be equivalent to a PALIGNR instruction etc. - but as discussed on D132308, until full fixed vector support for SK_Splice is in place, just assume its a SK_PermuteTwoSrc.
Added:
Modified:
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index 964c100846b2e..e0f11666a1b6d 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -1106,8 +1106,10 @@ InstructionCost X86TTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
std::pair<InstructionCost, MVT> LT = getTypeLegalizationCost(BaseTp);
Kind = improveShuffleKindFromMask(Kind, Mask);
+
// Treat Transpose as 2-op shuffles - there's no
diff erence in lowering.
- if (Kind == TTI::SK_Transpose)
+ // TODO: Treat Splice as 2-op shuffles - improve this in the future.
+ if (Kind == TTI::SK_Transpose || Kind == TTI::SK_Splice)
Kind = TTI::SK_PermuteTwoSrc;
// For Broadcasts we are splatting the first element from the first input
More information about the llvm-commits
mailing list