[all-commits] [llvm/llvm-project] adc371: [LoopVectorizer] NFC: Remove unnecessary asserts t...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Wed Dec 9 03:26:13 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: adc37145dec9cadf76af05326150ed22a3cc2fdd
      https://github.com/llvm/llvm-project/commit/adc37145dec9cadf76af05326150ed22a3cc2fdd
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2020-12-09 (Wed, 09 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

  Log Message:
  -----------
  [LoopVectorizer] NFC: Remove unnecessary asserts that VF cannot be scalable.

This patch removes a number of asserts that VF is not scalable, even though
the code where this assert lives does nothing that prevents VF being scalable.

Reviewed By: dmgreen

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


  Commit: d568cff696e8fb89ce1b040561c037412767af60
      https://github.com/llvm/llvm-project/commit/d568cff696e8fb89ce1b040561c037412767af60
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2020-12-09 (Wed, 09 Dec 2020)

  Changed paths:
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/lib/IR/IRBuilder.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlan.h
    M llvm/test/Transforms/LoopVectorize/metadata-width.ll
    A llvm/test/Transforms/LoopVectorize/scalable-loop-unpredicated-body-scalar-tail.ll

  Log Message:
  -----------
  [LoopVectorizer][SVE] Vectorize a simple loop with with a scalable VF.

* 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 can vectorize the following loop [1]:

   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;
     }
   }

[1] This source-level example is based on the pragma proposed
separately in D89031. This patch only implements the LLVM part.

Reviewed By: dmgreen

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


Compare: https://github.com/llvm/llvm-project/compare/4519ff4b6f02...d568cff696e8


More information about the All-commits mailing list