[PATCH] D116554: [VPlan] Add & use utility to check if only the first lane is used.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 16 07:55:57 PST 2022


fhahn updated this revision to Diff 400385.
fhahn marked 2 inline comments as done.
fhahn added a comment.



In D116554#3239783 <https://reviews.llvm.org/D116554#3239783>, @Ayal wrote:

> Worth having RecipeBase indicate if it's using first lane only, per operand and/or for all operands, in order to associate this logic within each recipe?

I moved the helpers to D116123 <https://reviews.llvm.org/D116123> so they can be used there to start with. I also applied the suggestion there and removed the definitions here. Unfortunately the change here cannot be applied before D116123 <https://reviews.llvm.org/D116123> because it requires separating out the step-vector part from the induction recipes first.

> UAV is propagated at the outset and its results are encoded in isUniform replicating recipes upon VPlan construction; should Blend recipe also record if it's blending uniform values or not, when constructed, instead of looking through it recursively here?

I am not sure if it is worth adding a new field at the moment, given that it should be very cheap to find out given the existing information and it reduces the amount of state we need to carry. I think it might be good as a follow-up, which can also use it during codegen of the recipe, so we only generate a scalar select.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116554/new/

https://reviews.llvm.org/D116554

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/X86/conversion-cost.ll
  llvm/test/Transforms/LoopVectorize/X86/uniform_mem_op.ll
  llvm/test/Transforms/LoopVectorize/first-order-recurrence-complex.ll
  llvm/test/Transforms/LoopVectorize/loop-form.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116554.400385.patch
Type: text/x-patch
Size: 23884 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220116/aae63e83/attachment.bin>


More information about the llvm-commits mailing list