[all-commits] [llvm/llvm-project] dda2cd: [AArch64][SVE2] Change the cost of extends with S/...

kmclaughlin-arm via All-commits all-commits at lists.llvm.org
Mon Aug 14 03:33:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dda2cd2505301aa626fcd3e8dea2a447227d00ca
      https://github.com/llvm/llvm-project/commit/dda2cd2505301aa626fcd3e8dea2a447227d00ca
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2023-08-14 (Mon, 14 Aug 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    A llvm/test/Transforms/LoopVectorize/AArch64/sve2-ext-rhadd-costs.ll
    A llvm/test/Transforms/LoopVectorize/AArch64/sve2-ext-rhadd.ll

  Log Message:
  -----------
  [AArch64][SVE2] Change the cost of extends with S/URHADD to 0

When SVE2 is enabled, we can combine an add of 1, add & shift right by 1
to a single s/urhadd instruction. If the operands to the adds are extended,
these extends will fold into the s/urhadd and their costs should be 0.

Reviewed By: dtemirbulatov

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




More information about the All-commits mailing list