[PATCH] D86444: [ARM] Increase MVE gather/scatter cost by MVECostFactor.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 04:15:01 PDT 2020


dmgreen created this revision.
dmgreen added reviewers: anwel, SjoerdMeijer, samparker, simon_tatham.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
Herald added a project: LLVM.
dmgreen requested review of this revision.

MVE Gather scatter codegeneration is looking a lot better than it used to, but still has some issues. The instructions we currently model as 1 cycle per element, which although is potentially an over-estimation, is a bit low for some cases. Increasing the cost by the MVECostFactor brings them in-line with our other instruction costs. This will have the effect of only generating then when the extra benefit is more likely to overcome some of the issues. Notably in running out of registers and vectorizing loops that could otherwise be SLP vectorized.

In the short-term whilst we look at other ways of dealing with those more directly, we can increase the costs of gathers to make them more likely to be beneficial.


https://reviews.llvm.org/D86444

Files:
  llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
  llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll
  llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86444.287335.patch
Type: text/x-patch
Size: 37558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200824/43efb99b/attachment.bin>


More information about the llvm-commits mailing list