[PATCH] D98245: [ARM] Tone down the MVE scalarization overhead

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 06:28:19 PDT 2021


SjoerdMeijer accepted this revision.
SjoerdMeijer added a comment.
This revision is now accepted and ready to land.

And the i64 costs go up because they are not legal ops? LGTM.



================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:820
                                  Opcode == Instruction::ExtractElement)) {
-    // We say MVE moves costs at least the MVEVectorCostFactor, even though
-    // they are scalar instructions. This helps prevent mixing scalar and
-    // vector, to prevent vectorising where we end up just scalarising the
-    // result anyway.
-    return std::max(BaseT::getVectorInstrCost(Opcode, ValTy, Index),
-                    ST->getMVEVectorCostFactor(TTI::TCK_RecipThroughput)) *
-           cast<FixedVectorType>(ValTy)->getNumElements() / 2;
+    // Integer cross-lane moves are more expensive that float, which can
+    // sometimes just be vmovs. Integer involve being passes to GPR registers,
----------------
Typo: that


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

https://reviews.llvm.org/D98245



More information about the llvm-commits mailing list