[PATCH] D89953: [AArch64] Implement getIntrinsicInstrCost, handle min/max intrinsics.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 05:44:17 PDT 2020
fhahn created this revision.
fhahn added reviewers: dmgreen, aemerson, jpaquette, samparker.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
Herald added a reviewer: paquette.
Herald added a project: LLVM.
fhahn requested review of this revision.
This patch adds a specialized implementation of getIntrinsicInstrCost
and add initial cost-modeling for min/max vector intrinsics.
AArch64 NEON support umin/smin/umax/smax for vectors
<8 x i8>, <16 x i8>, <4 x i16>, <8 x i16>, <2 x i32> and <4 x i32>.
Notably, it does not support vectors with i64 elements.
This change by itself should have very little impact on codegen, but in
follow-up patches I plan to teach the vectorizers to consider using
those intrinsics on platforms where it is profitable, e.g. because there
is no general 'select'-like instruction.
The current cost returned should be better for throughput, latency and size.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89953
Files:
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/test/Analysis/CostModel/AArch64/min-max.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89953.299937.patch
Type: text/x-patch
Size: 11248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201022/0e5a9a86/attachment.bin>
More information about the llvm-commits
mailing list