[llvm] [RISCV][TTI] Implement getAddressComputationCost() in RISCV TTI. (PR #149955)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 22 21:11:55 PDT 2025


================
@@ -1085,6 +1085,12 @@ InstructionCost RISCVTTIImpl::getGatherScatterOpCost(
     return BaseT::getGatherScatterOpCost(Opcode, DataTy, Ptr, VariableMask,
                                          Alignment, CostKind, I);
 
+  // Gather/Scatter instruction will need to calculate the address of each
----------------
ElvisWang123 wrote:

Oh, yes. This should be implemented in `getAddressComputationCost()`. 

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


More information about the llvm-commits mailing list