[PATCH] D123414: [AArch64] Break up larger shuffle-masks into legal sizes in getShuffleCost

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 10:42:53 PDT 2022


dmgreen created this revision.
dmgreen added reviewers: SjoerdMeijer, labrinea, samtebbs, jaykang10.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

Given a larger-than-legal shuffle mask, the final codegen will split into multiple sub-vectors. This attempts to model that in AArch64TTIImpl::getShuffleCost, splitting masks up according to the size of the legalized vectors. If the sub-masks have at most 2 input sources we can call getShuffleCost on them and sum the costs, to get a more accurate final cost for the entire shuffle. The call to improveShuffleKindFromMask helps to improve the shuffle kind for the sub-mask cost call.


https://reviews.llvm.org/D123414

Files:
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/test/Analysis/CostModel/AArch64/shuffle-other.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123414.421585.patch
Type: text/x-patch
Size: 14661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220408/28351d5b/attachment-0001.bin>


More information about the llvm-commits mailing list