[llvm] [AArch64] Increase scatter overhead on Neoverse-V2 (PR #101296)

Madhur Amilkanthwar via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 08:39:12 PDT 2024


================
@@ -3424,7 +3424,15 @@ InstructionCost AArch64TTIImpl::getGatherScatterOpCost(
   // Add on an overhead cost for using gathers/scatters.
   // TODO: At the moment this is applied unilaterally for all CPUs, but at some
   // point we may want a per-CPU overhead.
-  MemOpCost *= getSVEGatherScatterOverhead(Opcode);
+  unsigned OpCost = 1;
+  if (ST->getProcFamily() == AArch64Subtarget::NeoverseV2) {
+     // Specialize overhead of scatter instructions on Neoverse-V2
+    if (Opcode == Instruction::Store)
+      OpCost = 13;
----------------
madhur13490 wrote:

I restructed the code a bit.

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


More information about the llvm-commits mailing list