[llvm] [AArch64][TTI] Improve `LegalVF` when computing gather-loads cost (PR #69617)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 08:41:04 PDT 2023


================
@@ -2996,6 +2996,9 @@ static unsigned getSVEGatherScatterOverhead(unsigned Opcode) {
 InstructionCost AArch64TTIImpl::getGatherScatterOpCost(
     unsigned Opcode, Type *DataTy, const Value *Ptr, bool VariableMask,
     Align Alignment, TTI::TargetCostKind CostKind, const Instruction *I) {
+  if (!isLegalMaskedGatherScatter(DataTy))
----------------
antoniofrighetto wrote:

Thought we wanted to favour an invalid cost in those cases, but makes sense. I confirm `isElementTypeLegalForScalableVector` is fixing the issues previously seen.

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


More information about the llvm-commits mailing list