[all-commits] [llvm/llvm-project] 0fcc6f: [AArch64] Implement getIntrinsicInstrCost, handle ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Oct 23 03:44:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fcc6f7a7607b3bf80e67b9f9a07b608724ee031
      https://github.com/llvm/llvm-project/commit/0fcc6f7a7607b3bf80e67b9f9a07b608724ee031
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
    M llvm/test/Analysis/CostModel/AArch64/min-max.ll

  Log Message:
  -----------
  [AArch64] Implement getIntrinsicInstrCost, handle min/max intrinsics.

This patch adds a specialized implementation of getIntrinsicInstrCost
and add initial cost-modeling for min/max vector intrinsics.

AArch64 NEON support umin/smin/umax/smax for vectors
<8 x i8>, <16 x i8>, <4 x i16>, <8 x i16>, <2 x i32> and <4 x i32>.
Notably, it does not support vectors with i64 elements.

This change by itself should have very little impact on codegen, but in
follow-up patches I plan to teach the vectorizers to consider using
those intrinsics on platforms where it is profitable, e.g. because there
is no general 'select'-like instruction.

The current cost returned should be better for throughput, latency and size.

Reviewed By: dmgreen

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




More information about the All-commits mailing list