[all-commits] [llvm/llvm-project] a458b7: [AArch64] Add AArch64TTIImpl::getMaskedMemoryOpCos...

david-arm via All-commits all-commits at lists.llvm.org
Mon Apr 26 03:00:34 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a458b7855e1ad9c79f05b37f13a4242fdac3fb31
      https://github.com/llvm/llvm-project/commit/a458b7855e1ad9c79f05b37f13a4242fdac3fb31
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-04-26 (Mon, 26 Apr 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
    A llvm/test/Analysis/CostModel/AArch64/masked_ldst.ll
    A llvm/test/Transforms/LoopVectorize/AArch64/masked-op-cost.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/vector-reverse-mask4.ll

  Log Message:
  -----------
  [AArch64] Add AArch64TTIImpl::getMaskedMemoryOpCost function

When vectorising for AArch64 targets if you specify the SVE attribute
we automatically then treat masked loads and stores as legal. Also,
since we have no cost model for masked memory ops we believe it's
cheap to use the masked load/store intrinsics even for fixed width
vectors. This can lead to poor code quality as the intrinsics will
currently be scalarised in the backend. This patch adds a basic
cost model that marks fixed-width masked memory ops as significantly
more expensive than for scalable vectors.

Tests for the cost model are added here:

  Transforms/LoopVectorize/AArch64/masked-op-cost.ll

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




More information about the All-commits mailing list