[all-commits] [llvm/llvm-project] 3d3d8f: [AArch64] Improve fsh(l|r) cost modeling if 3rd ar...

Zain Jaffal via All-commits all-commits at lists.llvm.org
Thu Apr 20 10:20:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d3d8fef07926f01cc08bba65728808f4fc6e36d
      https://github.com/llvm/llvm-project/commit/3d3d8fef07926f01cc08bba65728808f4fc6e36d
  Author: Zain Jaffal <z_jaffal at apple.com>
  Date:   2023-04-20 (Thu, 20 Apr 2023)

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

  Log Message:
  -----------
  [AArch64] Improve fsh(l|r) cost modeling if 3rd arg is constant.

In that case, the cost for i32 and i64 should be 1 (a single EXTR
instruction). For v4i32 and v2i64 it should be 3 (USHR + SHL + ORR).

Other sizes smaller than 64 bits require an extra instruction for
conversion to i32/i64.

This recovers a SLP regression revealed by D140392.

Reviewed By: dmgreen

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




More information about the All-commits mailing list