[llvm] [CostModel][X86] Add initial costs for non-lane-crossing one/two input shuffles (PR #114680)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 3 07:23:55 PST 2024
================
@@ -1559,6 +1559,22 @@ InstructionCost X86TTIImpl::getShuffleCost(
return TTI::TCC_Free;
}
+ // Attempt to detect a cheaper inlane shuffle, avoiding 128-bit subvector
+ // permutation.
+ bool IsInLaneShuffle = false;
+ if (BaseTp->getPrimitiveSizeInBits() > 0 &&
+ (BaseTp->getPrimitiveSizeInBits() % 128) == 0 &&
+ Mask.size() == BaseTp->getElementCount().getKnownMinValue()) {
----------------
alexey-bataev wrote:
Shall we also check that the original type of the vector element is the same as the type of the "legalized" (machine) vector type?
https://github.com/llvm/llvm-project/pull/114680
More information about the llvm-commits
mailing list