[all-commits] [llvm/llvm-project] d0027e: [AArch64][TTI] Cost model FADD/FSUB/FNEG

sjoerdmeijer via All-commits all-commits at lists.llvm.org
Tue Apr 11 01:47:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d0027e0be990df60f6f826123f035286a168f288
      https://github.com/llvm/llvm-project/commit/d0027e0be990df60f6f826123f035286a168f288
  Author: Sjoerd Meijer <smeijer at nvidia.com>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/AArch64/arith-fp-sve.ll
    M llvm/test/Analysis/CostModel/AArch64/arith-fp.ll
    M llvm/test/Analysis/CostModel/AArch64/cast.ll
    M llvm/test/Analysis/CostModel/AArch64/reduce-fadd.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-fixed-length.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-math.ll
    M llvm/test/Transforms/SLPVectorizer/AArch64/matmul.ll
    M llvm/test/Transforms/SLPVectorizer/AArch64/remarks.ll

  Log Message:
  -----------
  [AArch64][TTI] Cost model FADD/FSUB/FNEG

This lowers the cost for FADD, FSUB, and FNEG. The motivation is to avoid
over-eager SLP vectorisation, that makes it look like SLP vectorisation is
profitable but results in significant slow downs. Lowering the cost for scalar
FADD/FSUB costs helps the profitability decision to favour the scalar
version where vectorisation isn't beneficial.

Lowering the cost for these floating point operations makes sense because a lot
of other instructions including many shuffles have only a cost of 1; these
FADD/FSUB/FNEG instructions should not be twice the cost.

Performance results show a 7% improvement for Imagick from SPEC FP 2017, a
small improvement in Blender, and unchanged results for the other apps in SPEC.
RAJAPerf is neutral and mostly shows no changes.

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




More information about the All-commits mailing list