[ARM] Increase MVE gather/scatter cost by MVECostFactor.
authorDavid Green <david.green@arm.com>
Wed, 26 Aug 2020 12:03:46 +0000 (13:03 +0100)
committerDavid Green <david.green@arm.com>
Wed, 26 Aug 2020 12:03:46 +0000 (13:03 +0100)
commit677c1590c03474c8238fbc21b9c0dae9b5e5f4d2
tree28e24eeb50937b208625afdd499d775752336fa4
parent4b5460762a9634ba6a96b9589e11a1f7a9beaa3f
[ARM] Increase MVE gather/scatter cost by MVECostFactor.

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 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 when created.

Differential Revision: https://reviews.llvm.org/D86444
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/Analysis/CostModel/ARM/mve-gather-scatter-cost.ll
llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll