[all-commits] [llvm/llvm-project] a2d657: [AArch64][CostModel] Improve scalar frem cost

Paschalis Mpeis via All-commits all-commits at lists.llvm.org
Wed Feb 21 04:43:48 PST 2024


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

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/test/Analysis/CostModel/AArch64/arith-fp-frem.ll
    M llvm/test/Analysis/CostModel/AArch64/arith-fp.ll

  Log Message:
  -----------
  [AArch64][CostModel] Improve scalar frem cost

In AArch64 the cost of scalar frem is the cost of a call to 'fmod'.


  Commit: 410a89cd17d8cb7050690af3e8862d7048f584e9
      https://github.com/llvm/llvm-project/commit/410a89cd17d8cb7050690af3e8862d7048f584e9
  Author: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
  Date:   2024-02-20 (Tue, 20 Feb 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

  Log Message:
  -----------
  Pass nullptr to get costs of the call to fmod/fmodff


  Commit: 982d28b651908bf3f865a2165e11fb654a063ee8
      https://github.com/llvm/llvm-project/commit/982d28b651908bf3f865a2165e11fb654a063ee8
  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: 3b12ec69371e11e2a8aa2aaca4a1702b3eaedfa2
      https://github.com/llvm/llvm-project/commit/3b12ec69371e11e2a8aa2aaca4a1702b3eaedfa2
  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.


Compare: https://github.com/llvm/llvm-project/compare/a2d657f1ec8d%5E...3b12ec69371e

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