[llvm] [CostModel][X86] Add initial costs for non-lane-crossing one/two input shuffles (PR #114680)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 3 08:21:19 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()) {
----------------
RKSimon wrote:
Sure, I think checking the scalar sizes match should be enough - I'll add that shortly
https://github.com/llvm/llvm-project/pull/114680
More information about the llvm-commits
mailing list