[all-commits] [llvm/llvm-project] 641aaf: SLP cannot vectorize frem calls in AArch64.

Paschalis Mpeis via All-commits all-commits at lists.llvm.org
Wed Feb 21 10:14:15 PST 2024


  Branch: refs/heads/users/paschalis-mpeis/frem-slp-vectorization
  Home:   https://github.com/llvm/llvm-project
  Commit: 641aaf7c13d520bef52b092726f8346bfecb1c8d
      https://github.com/llvm/llvm-project/commit/641aaf7c13d520bef52b092726f8346bfecb1c8d
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-02-21 (Wed, 21 Feb 2024)

  Changed paths:
    A llvm/test/Transforms/SLPVectorizer/AArch64/slp-frem.ll

  Log Message:
  -----------
  SLP cannot vectorize frem calls in AArch64.

It needs updated costs when there are available vector library functions
given the VF and type.


  Commit: 29ae086478e3d4bae6b6250670f87273359626d7
      https://github.com/llvm/llvm-project/commit/29ae086478e3d4bae6b6250670f87273359626d7
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-02-21 (Wed, 21 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/AArch64/slp-frem.ll

  Log Message:
  -----------
  [AArch64] SLP can vectorize frem

When vector library calls are available for frem, given its type and
vector length, the SLP vectorizer uses updated costs that amount to a
call, matching LoopVectorizer's functionality.

This allows 'superword-level' vectorization, which can be converted to
a vector lib call by later passes.

Add tests that vectorize code that contains 2x double and 4x float frem
instructions.


  Commit: b4a7eed279a092c5d83b019788373aee93540db6
      https://github.com/llvm/llvm-project/commit/b4a7eed279a092c5d83b019788373aee93540db6
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-02-21 (Wed, 21 Feb 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

  Log Message:
  -----------
  Added 'getVecLibCallCost' in TTI.

Unfortunately TLI (TargetLibraryInfo) is not available in TTI and
changing the signature of 'getArithmeticInstrCost' would cause
significant changes in loads of places.

As a compromise getVecLibCallCost returns a vector library exist for
a given target + vector type.


Compare: https://github.com/llvm/llvm-project/compare/3b12ec69371e...b4a7eed279a0

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list