[llvm] [TTI] Return a more sensible cost for histogram intrinsic. (PR #97397)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 02:32:54 PDT 2024
================
@@ -508,11 +513,39 @@ static bool isUnpackedVectorVT(EVT VecVT) {
VecVT.getSizeInBits().getKnownMinValue() < AArch64::SVEBitsPerBlock;
}
+static InstructionCost getHistogramCost(const IntrinsicCostAttributes &ICA) {
+ Type *BucketPtrsTy = ICA.getArgTypes()[0]; // Type of vector of pointers
+ Type *EltTy = ICA.getArgTypes()[1]; // Type of bucket elements
+
+ // Only allow (32b and 64b) integers or pointers for now...
----------------
huntergr-arm wrote:
The histcnt instruction only supports 32b and 64b elements natively. I haven't implemented legalization for smaller types yet, so I'm excluding them for now. Once the loop vectorize changes have landed I intend to implement legalization on AArch64, and will update this function to reflect that.
https://github.com/llvm/llvm-project/pull/97397
More information about the llvm-commits
mailing list