[all-commits] [llvm/llvm-project] 5d9318: [NFC][LoopVectorize] Change getStepVector to take ...

david-arm via All-commits all-commits at lists.llvm.org
Wed Oct 27 08:12:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d9318638e892143c7788191ca1d89445582880b
      https://github.com/llvm/llvm-project/commit/5d9318638e892143c7788191ca1d89445582880b
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

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

  Log Message:
  -----------
  [NFC][LoopVectorize] Change getStepVector to take a Value* for the StartIdx

This patch changes the definition of getStepVector from:

  Value *getStepVector(Value *Val, int StartIdx, Value *Step, ...

to

  Value *getStepVector(Value *Val, Value *StartIdx, Value *Step, ...

because:

1. it seems inconsistent to pass some values as Value* and some as
   integer, and
2. future work will require the StartIdx to be an expression made up
   of runtime calculations of the VF.

In widenIntOrFpInduction I've changed the code to pass in the
value returned from getRuntimeVF, but the presence of the assert:

  assert(!VF.isScalable() && "scalable vectors not yet supported.");

means that currently this code path is only exercised for fixed-width
VFs and so the patch is still NFC.

Differential revision: https://reviews.llvm.org/D111882




More information about the All-commits mailing list