Page MenuHomePhabricator

[ARM] Add a very basic active_lane_mask cost

Authored by dmgreen on Oct 7 2020, 10:58 AM.



This adds a very basic cost for active_lane_mask under MVE - making the assumption that they will be free and then apologizing for that in a comment.

In reality they may either be free (by being nicely folded into a tail predicated loop), cost the same as a VCTP or be expanded into vdup's, adds and cmp's. It is difficult to detect the difference from a single getIntrinsicInstrCost call, so makes the assumption that the vectorizer is adding them, and only added them where it makes sense.

We may need to change this in the future to better model predicate costs in the vectorizer, especially at -Os or non-tail predicated loops. The vectorizer currently does not query the cost of these instructions but that will change in the future and a zero cost there probably makes the most sense at the moment.

Diff Detail

Event Timeline

dmgreen created this revision.Oct 7 2020, 10:58 AM
dmgreen requested review of this revision.Oct 7 2020, 10:58 AM
SjoerdMeijer accepted this revision.Oct 16 2020, 7:15 AM

Forgot about this one, but agree with this.

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