[PATCH] D103629: [AArch64] Cost-model i8 vector loads/stores

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 09:47:46 PDT 2021


SjoerdMeijer marked an inline comment as not done.
SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1260
+    if (cast<FixedVectorType>(Ty)->getNumElements() < ProfitableNumElements)
+      return cast<FixedVectorType>(Ty)->getNumElements() * 2;
   }
----------------
sdesmalen wrote:
> Should the "else" case still be the original high cost? (or some other high cost)
Thanks for taking a look!

I think this is the expensive case that we want to get more correct. It's expensive if the vector is smaller than some magic number, which we check with `< ProfitableNumElements`.

The "else" case is the cheap case, for which we will return `LT.first`. I think this makes sense, but will double check, and let me know if I missed something here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103629/new/

https://reviews.llvm.org/D103629



More information about the llvm-commits mailing list