[all-commits] [llvm/llvm-project] e7b89c: Add BasicTTIImpl cost model for llvm.get.active.la...

david-arm via All-commits all-commits at lists.llvm.org
Mon Mar 14 02:35:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7b89c2fc359b3f4cab7b8b30d06e39b20ef6ddf
      https://github.com/llvm/llvm-project/commit/e7b89c2fc359b3f4cab7b8b30d06e39b20ef6ddf
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2022-03-14 (Mon, 14 Mar 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
    A llvm/test/Analysis/CostModel/ARM/active_lane_mask.ll
    A llvm/test/Analysis/CostModel/RISCV/active_lane_mask.ll

  Log Message:
  -----------
  Add BasicTTIImpl cost model for llvm.get.active.lane.mask intrinsic

The vectoriser sometimes generates predicated vector loops using
the llvm.get.active.lane.mask intrinsic so it's important that we
are able to calculate a valid cost for the call instruction. When
SVE is enabled we are able to use a single whilelo instruction
for some vector types - in such cases I've marked the cost as 1.
For all other cases I've set the cost according to how the intrinsic
will be expanded.

Tests added here:

  Analysis/CostModel/AArch64/sve-intrinsics.ll
  Analysis/CostModel/ARM/active_lane_mask.ll
  Analysis/CostModel/RISCV/active_lane_mask.ll

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




More information about the All-commits mailing list