[all-commits] [llvm/llvm-project] d79ee3: [ARM] Add a very basic active_lane_mask cost

David Green via All-commits all-commits at lists.llvm.org
Sat Oct 17 02:10:05 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d79ee3a807115f8b96f9f8aa13d99cdea1652980
      https://github.com/llvm/llvm-project/commit/d79ee3a807115f8b96f9f8aa13d99cdea1652980
  Author: David Green <david.green at arm.com>
  Date:   2020-10-17 (Sat, 17 Oct 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
    M llvm/lib/Target/ARM/ARMTargetTransformInfo.h
    A llvm/test/Analysis/CostModel/ARM/mve-active_lane_mask.ll

  Log Message:
  -----------
  [ARM] Add a very basic active_lane_mask cost

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.

Differential Revision: https://reviews.llvm.org/D88989




More information about the All-commits mailing list