[all-commits] [llvm/llvm-project] 12025c: [CostModel] Use min/max intrinsics for vecreduce.m...

David Green via All-commits all-commits at lists.llvm.org
Tue Jul 4 07:02:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 12025cef3ec84f9528613c6248df92341ab2c765
      https://github.com/llvm/llvm-project/commit/12025cef3ec84f9528613c6248df92341ab2c765
  Author: David Green <david.green at arm.com>
  Date:   2023-07-04 (Tue, 04 Jul 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
    M llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
    M llvm/lib/Target/X86/X86TargetTransformInfo.cpp
    M llvm/lib/Target/X86/X86TargetTransformInfo.h
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Analysis/CostModel/AArch64/reduce-minmax.ll
    M llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll

  Log Message:
  -----------
  [CostModel] Use min/max intrinsics for vecreduce.min/max costs

This changes the costmodelling of the vecreduce.min/max nodes to use the costs
of the relevant min/max intrinsics instead of expanding them to compare and
selects. The getMinMaxReductionCost have changed to take a Opcode for the
relevant intrinsic, dropping the IsUnsigned and CondTy parameters as they are
no longer needed.

A follow up patch will add some basic fminimum/fmaximum costmodelling.

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




More information about the All-commits mailing list