[PATCH] D91077: [LoopVectorizer][SVE] Vectorize a simple loop with with a scalable VF.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 06:53:39 PST 2020


sdesmalen created this revision.
sdesmalen added reviewers: dmgreen, vkmr, rogfer01, ctetreau, craig.topper.
Herald added subscribers: dexonsmith, psnobl, hiraditya, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: LLVM.
sdesmalen requested review of this revision.

- Steps are scaled by `vscale`, a runtime value.
- Changes to circumvent the cost-model for now (temporary) so that the cost-model can be implemented separately.

This vectorizes:

  void loop(int N, double *a, double *b) {
    #pragma clang loop vectorize_width(4, scalable)
    for (int i = 0; i < N; i++) {
      a[i] = b[i] + 1.0;
    }
  }


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91077

Files:
  llvm/include/llvm/IR/IRBuilder.h
  llvm/lib/IR/IRBuilder.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/test/Transforms/LoopVectorize/scalable-loop-unpredicated-body-scalar-tail.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91077.303860.patch
Type: text/x-patch
Size: 20688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201109/5cb48c42/attachment.bin>


More information about the llvm-commits mailing list