[all-commits] [llvm/llvm-project] 8c9742: [SVE][LoopVectorize] Add support for scalable vect...

kmclaughlin-arm via All-commits all-commits at lists.llvm.org
Thu May 6 03:49:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c9742bd239af602ee2743baa3c4281f24d45df1
      https://github.com/llvm/llvm-project/commit/8c9742bd239af602ee2743baa3c4281f24d45df1
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2021-05-06 (Thu, 06 May 2021)

  Changed paths:
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/lib/IR/IRBuilder.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/AArch64/first-order-recurrence.ll
    A llvm/test/Transforms/LoopVectorize/scalable-first-order-recurrence.ll

  Log Message:
  -----------
  [SVE][LoopVectorize] Add support for scalable vectorization of first-order recurrences

Adds support for scalable vectorization of loops containing first-order recurrences, e.g:
```
for(int i = 0; i < n; i++)
  b[i] =  a[i] + a[i - 1]
```
This patch changes fixFirstOrderRecurrence for scalable vectors to take vscale into
account when inserting into and extracting from the last lane of a vector.
CreateVectorSplice has been added to construct a vector for the recurrence, which
returns a splice intrinsic for scalable types. For fixed-width the behaviour
remains unchanged as CreateVectorSplice will return a shufflevector instead.

The tests included here are the same as test/Transform/LoopVectorize/first-order-recurrence.ll

Reviewed By: david-arm, fhahn

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




More information about the All-commits mailing list