[PATCH] D116123: [VPlan] Handle IV vector splat as VPInstruction.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 21 11:55:35 PST 2021


fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin.
Herald added subscribers: tschuett, dmgreen, psnobl, rogfer01, bollu, hiraditya.
fhahn requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.

This patch adds a new StepVector opcode to create a stepvector based on
a start value and a step.

This is then used to explicitly express IV vector splats, instead of
doing so in widenIntOrFpInduction.

This has the following benefits:

1. First step to avoid setting both vector and scalar values for the same induction def.
2. Reducing complexity of widenIntOrFpInduction through making things more explicit in VPlan
3. Only need to splat the vector IV for block in masks.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116123

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
  llvm/lib/Transforms/Vectorize/VPlan.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/lib/Transforms/Vectorize/VPlanValue.h
  llvm/test/Transforms/LoopVectorize/AArch64/tail-fold-uniform-memops.ll
  llvm/test/Transforms/LoopVectorize/ARM/mve-gather-scatter-tailpred.ll
  llvm/test/Transforms/LoopVectorize/ARM/mve-reduction-types.ll
  llvm/test/Transforms/LoopVectorize/X86/constant-fold.ll
  llvm/test/Transforms/LoopVectorize/X86/optsize.ll
  llvm/test/Transforms/LoopVectorize/X86/pr34438.ll
  llvm/test/Transforms/LoopVectorize/X86/small-size.ll
  llvm/test/Transforms/LoopVectorize/X86/tail_loop_folding.ll
  llvm/test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll
  llvm/test/Transforms/LoopVectorize/dont-fold-tail-for-const-TC.ll
  llvm/test/Transforms/LoopVectorize/dont-fold-tail-for-divisible-TC.ll
  llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
  llvm/test/Transforms/LoopVectorize/pr44488-predication.ll
  llvm/test/Transforms/LoopVectorize/pr46525-expander-insertpoint.ll
  llvm/test/Transforms/LoopVectorize/pr51614-fold-tail-by-masking.ll
  llvm/test/Transforms/LoopVectorize/reduction-order.ll
  llvm/test/Transforms/LoopVectorize/select-reduction.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116123.395732.patch
Type: text/x-patch
Size: 56059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211221/42a95cde/attachment.bin>


More information about the llvm-commits mailing list