[PATCH] D111882: [NFC][LoopVectorize] Change getStepVector to take a Value* for the StartIdx

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 15 05:29:48 PDT 2021


david-arm created this revision.
david-arm added reviewers: sdesmalen, kmclaughlin, fhahn, peterwaller-arm.
Herald added a subscriber: hiraditya.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111882

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111882.379974.patch
Type: text/x-patch
Size: 4717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211015/b0ffad1f/attachment.bin>


More information about the llvm-commits mailing list