[all-commits] [llvm/llvm-project] f2a92d: [AArch64] Don't treat SVE scalable extends as free...

David Green via All-commits all-commits at lists.llvm.org
Wed Nov 30 05:10:01 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f2a92db29eb7519a5eef8792b9c8622aa17e5853
      https://github.com/llvm/llvm-project/commit/f2a92db29eb7519a5eef8792b9c8622aa17e5853
  Author: David Green <david.green at arm.com>
  Date:   2022-11-30 (Wed, 30 Nov 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/AArch64/sve-widening-instruction.ll

  Log Message:
  -----------
  [AArch64] Don't treat SVE scalable extends as free widening instructions

The logic in isWideningInstruction handles instructions like uaddw and
smull, where 'add(x, zext(y))' or 'mul(sext(x), sext(y))' can be
converted to single instructions, making the extends free. This doesn't
apply the same to SVE instructions though.
https://godbolt.org/z/695d3nhGd

(There are instructions like SMULLT/B, but they require top/bottom lane
interleaving. That is similar to MVE instructions, which required a
special pass to perform the lane interleaving).

This patch just bails out of the call to isWideningInstruction if the
vector is scalable, getting a more accurate cost.

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




More information about the All-commits mailing list