[PATCH] D99750: [LV, VP]VP intrinsics support for the Loop Vectorizer
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 10:30:25 PDT 2023
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9845
+ if (auto *IMask = dyn_cast<VPInstruction>(Mask))
+ if (IMask->getOpcode() == VPInstruction::ICmpULE)
+ return Builder.getTrueVector(EC);
----------------
fhahn wrote:
> ABataev wrote:
> > fhahn wrote:
> > > It's not clear to me what the reasoning is here to simplify this to the all-true mask without checking the operands of the compare. If the compare can be simplified to the all-true mask, then this would be suitable to do as VPlan-to-VPlan simplification instead of during codegen.
> > Added extra check.
> Thanks for the update. Looking at this again, it seems like it would be better to either perform this simplification when creating the tail-folding mask or optimize as VPlan-to-VPlan transform, as presumably this applies to all users of the top-level mask? Might be good to tie in with D157037 which would always create the top-level mask in the beginning when tail-folding.
If I understand your proposal correctly, it will require adding special VPValue like AllTrueVPValue. This lambda returns Value *, no VPValue, so it cannot be done directly without adding new live-in(?).
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