This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Basic getArithmeticReductionCost reduction costs
ClosedPublic

Authored by dmgreen on Oct 7 2020, 9:54 AM.

Details

Summary

This adds some basic costs for MVE reductions - currently just marking the simple legal add vectors as cheap. More complex costing can be added in the future when the framework more readily allows it.

Diff Detail

Event Timeline

dmgreen created this revision.Oct 7 2020, 9:54 AM
dmgreen requested review of this revision.Oct 7 2020, 9:54 AM
SjoerdMeijer added inline comments.Oct 16 2020, 7:17 AM
llvm/test/Analysis/CostModel/ARM/mve-vecreduce-add.ll
2

Since you have a ST->hasMVEIntegerOps() check, do we need a run with -mattr=-mve?

dmgreen added inline comments.Oct 17 2020, 1:15 AM
llvm/test/Analysis/CostModel/ARM/mve-vecreduce-add.ll
2

Do you mean, are there tests without MVE? If so yeah, but they are in a different test file and did not change. reduce-add.ll in the same folder contains some other basic tests for Neon and without any vectorization.

SjoerdMeijer accepted this revision.Oct 17 2020, 1:16 AM

Okidoki, cheers.

This revision is now accepted and ready to land.Oct 17 2020, 1:16 AM
This revision was automatically updated to reflect the committed changes.