[all-commits] [llvm/llvm-project] d70251: [LoopVectorize][NFC] Refactor code to use IRBuilde...

david-arm via All-commits all-commits at lists.llvm.org
Tue Mar 23 04:29:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d70251163f718200888b1b3dd6f95e03f8213995
      https://github.com/llvm/llvm-project/commit/d70251163f718200888b1b3dd6f95e03f8213995
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-03-23 (Tue, 23 Mar 2021)

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

  Log Message:
  -----------
  [LoopVectorize][NFC] Refactor code to use IRBuilder::CreateStepVector

In places where we create a ConstantVector whose elements are a
linear sequence of the form <start, start + 1, start + 2, ...>
I've changed the code to make use of CreateStepVector, which creates
a vector with the sequence <0, 1, 2, ...>, and a vector addition
operation. This patch is a non-functional change, since the output
from the vectoriser remains unchanged for fixed length vectors and
there are existing asserts that still fire when attempting to use
scalable vectors for vectorising induction variables.

In a later patch we will enable support for scalable vectors
in InnerLoopVectorizer::getStepVector(), which relies upon the new
stepvector intrinsic in IRBuilder::CreateStepVector.

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




More information about the All-commits mailing list