[all-commits] [llvm/llvm-project] b219a9: [CostModel][AArch64] Fix ctpop intrinsic cost when...

Eli Friedman via All-commits all-commits at lists.llvm.org
Fri Sep 2 15:18:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b219a9c0a29ef91d4738266a755a76577f5ab031
      https://github.com/llvm/llvm-project/commit/b219a9c0a29ef91d4738266a755a76577f5ab031
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2022-09-02 (Fri, 02 Sep 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/AArch64/ctpop.ll

  Log Message:
  -----------
  [CostModel][AArch64] Fix ctpop intrinsic cost when NEON is disabled.

If we don't have NEON, we use the generic fallback, which takes 12
instructions. Make sure the costs reflect that.

(On a related note, we could optimize the generic fallback a bit. It
currently uses sequences like lsr+and+add; if we use and+lsr+add
instead, we can fold the lsr into the add.)

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




More information about the All-commits mailing list