[PATCH] D99750: [LV, VP]VP intrinsics support for the Loop Vectorizer
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 20 14:24:03 PDT 2023
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9886
+
+ NewSI = Builder.CreateCall(
+ VPIntr, {StoredVal, VecPtr, BlockInMaskPart, EVLPart});
----------------
fhahn wrote:
> fhahn wrote:
> > craig.topper wrote:
> > > Should set the alignment attribute on the pointer operand.
> > >
> > > Something like
> > > ```
> > > NewSI->addParamAttr(1, Attribute::getWithAlignment(NewSI->getContext(), Alignment));
> > > ```
> > Is there a reason for creating the VP intrinsic call explicitly rather than using the VP builder?
> Ah I originally thought that the vector builder provides the same interface as IRBuilder, but uses the vector predication intrinsics when mask/EVL is set. Together with performing the `MaskValue` simplification as VP2VP transform, this would effectively reduce the changes here to a few lines, i.e. only setting EVL in addition to the mask.
>
> Another thing came to mind: is there a plan to converge the separate masked memory intrinsics and the vector predication versions, i.e. long term, should the masked memory intrinsics be superseded by the vector predication ones?
> Ah I originally thought that the vector builder provides the same interface as IRBuilder, but uses the vector predication intrinsics when mask/EVL is set. Together with performing the `MaskValue` simplification as VP2VP transform, this would effectively reduce the changes here to a few lines, i.e. only setting EVL in addition to the mask.
>
> Another thing came to mind: is there a plan to converge the separate masked memory intrinsics and the vector predication versions, i.e. long term, should the masked memory intrinsics be superseded by the vector predication ones?
We did not discuss it yet and it should separate discussion/decision. Though it would be good to make it part of masked intrinsics or even instructions (along with the mask).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99750/new/
https://reviews.llvm.org/D99750
More information about the llvm-commits
mailing list