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

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 00:01:40 PDT 2023


================
@@ -2989,7 +2989,14 @@ InstructionCost AArch64TTIImpl::getGatherScatterOpCost(
       ElementCount::getScalable(1))
----------------
davemgreen wrote:

It didn't look like that function was called when I tried it, and it is best if these functions work correctly in isolation. It's possible to call it throught the cost model: https://godbolt.org/z/z4635vodq.

I think that because the gather will not become a scalable SVE gather in this case, the line above with useNeonVector should be returning true so we use the BaseT::getGatherScatterOpCost for the cost. 

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


More information about the llvm-commits mailing list