[PATCH] D75525: [TTI][ARM][MVE] Refine gather/scatter cost model

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 02:52:57 PST 2020


samparker added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:910
+            cast<Instruction>(Us)->getType()->getScalarSizeInBits();
+        if ((TypeSize == 32 && (EltSize == 8 || EltSize == 16)) ||
+            (TypeSize == 16 && EltSize == 8)) {
----------------
Could we just return the ScalarCost if this isn't true?


================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:921
+        (match(I, m_Intrinsic<Intrinsic::masked_scatter>()) &&
+         I->getNumUses() == 0 && (T = dyn_cast<TruncInst>(I->getOperand(1))))) {
+      // only allow valid type combinations
----------------
dmgreen wrote:
> I don't think this  I->getNumUses() == 0 is needed?
Do we really need to check the uses of a store?


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

https://reviews.llvm.org/D75525





More information about the llvm-commits mailing list