[all-commits] [llvm/llvm-project] ba1e15: [SVE] Add support for scalable vectorization of lo...

kmclaughlin-arm via All-commits all-commits at lists.llvm.org
Tue Feb 16 05:50:44 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ba1e150d03cac7629111a90eea1f2d727e465983
      https://github.com/llvm/llvm-project/commit/ba1e150d03cac7629111a90eea1f2d727e465983
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2021-02-16 (Tue, 16 Feb 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/AArch64/scalable-reductions.ll

  Log Message:
  -----------
  [SVE] Add support for scalable vectorization of loops with int/fast FP reductions

This patch enables scalable vectorization of loops with integer/fast reductions, e.g:

```
unsigned sum = 0;
for (int i = 0; i < n; ++i) {
  sum += a[i];
}
```

A new TTI interface, isLegalToVectorizeReduction, has been added to prevent
reductions which are not supported for scalable types from vectorizing.
If the reduction is not supported for a given scalable VF,
computeFeasibleMaxVF will fall back to using fixed-width vectorization.

Reviewed By: david-arm, fhahn, dmgreen

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




More information about the All-commits mailing list