[PATCH] D129109: [Costmodel] Add "type-based-intrinsic-cost" cli option

mgabka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 06:15:34 PDT 2022


mgabka added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1782
+
+    case Intrinsic::masked_scatter: {
+      // For type based cost assume worse case scenario.
----------------
@malharJ could you remove this and the case below?

I think this patch could be limited to just adding the new interface to the cost model to allow extra testing.

With the cost for masked_gather and massked_scatter, it needs to be done a bit differently as with this changes you made it will always add in the legalization cost. I think it needs to be done by adding extra AArch64TTIImpl::getTypeBasedIntrinsicInstrCost method

But the main purpose of this patch is to ensure that all paths in the cost model can be unit tested and returning an invalid cost for scalable vectors is still something what compiler should support in other parts.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129109/new/

https://reviews.llvm.org/D129109



More information about the llvm-commits mailing list