[PATCH] D120880: [AArch64] Insert subvector costs

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 3 02:22:10 PST 2022


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

An insert subvector under aarch64 can often be done as a single lane mov operation. For example a v4i8 inserted into a v16i8 is a "s" mov, so long as the index is a multiple of 4. This teaches the cost model that, using code copied over from the X86 backend.

Some of the costs (v16i16_4_0) are still high because they get matched as a "SK_Select", not an "SK_InsertSubvector".


https://reviews.llvm.org/D120880

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120880.412641.patch
Type: text/x-patch
Size: 21100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220303/32acfab4/attachment.bin>


More information about the llvm-commits mailing list