[llvm] [X86][CostModel] Cost gathers by the instructions CodeGen emits (PR #220565)

Sumukh J Bharadwaj via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 06:22:34 PDT 2026


================
@@ -6649,34 +6657,29 @@ InstructionCost X86TTIImpl::getGSVectorCost(unsigned Opcode,
 
   // Trying to reduce IndexSize to 32 bits for vector 16.
   // By default the IndexSize is equal to pointer size.
-  unsigned IndexSize = (ST->hasAVX512() && VF >= 16)
-                           ? getIndexSizeInBits(Ptr, DL)
-                           : DL.getPointerSizeInBits();
+  unsigned IndexSize =
+      (ST->hasAVX512() && VF >= 16) ? getIndexSizeInBits(Ptr) : PtrSizeInBits;
----------------
amd-subharad wrote:

the width is now derived whenever a hardware gather or scatter is priced

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


More information about the llvm-commits mailing list