[PATCH] D93030: [AArch64][SVE]Add cost model for masked gather and scatter for scalable vector.

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 04:22:54 PST 2020


david-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:784
+  // TODO: Replace assert for InstructionCost
+  assert(MaxNumVScale && "Invalid Cost");
+
----------------
nit: I wonder if the assert here should say something like "Expected valid max vscale" here?


================
Comment at: llvm/test/Analysis/CostModel/AArch64/sve-getIntrinsicInstrCost-gather.ll:10
+
+define <vscale x 4 x i32> @masked_gather_nxv4i32(<vscale x 4 x i32*> %ld, <vscale x 4 x i1> %masks, <vscale x 4 x i32> %passthru) {
+; CHECK-LABEL: 'masked_gather_nxv4i32'
----------------
Is it worth having at least one illegal gather test here too? For example, gathers or scatters of <vscale x 8 x i32> - this tests the case when LT.first > 1 in your cost calculation code above.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93030



More information about the llvm-commits mailing list