[llvm] [TTI] Return a more sensible cost for histogram intrinsic. (PR #97397)

Dinar Temirbulatov via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 15:41:38 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...
----------------
dtemirbulatov wrote:

hmm, sorry I was not focusing on the other set of patches for histagram work, but why we don't have i16 elements types now?

https://github.com/llvm/llvm-project/pull/97397


More information about the llvm-commits mailing list