[PATCH] D109432: [LoopVectorize] Permit fixed-width epilogue loops for scalable vector bodies
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 4 01:04:40 PDT 2021
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8407
+ IRBuilder<> B(&*Lp->getLoopPreheader()->getFirstInsertionPt());
+ Value *Step = getRuntimeVF(B, IdxTy, VF * UF);
Value *CountRoundDown = getOrCreateVectorTripCount(Lp);
----------------
sdesmalen wrote:
> Not sure I fully understand it, but is the VF at this point always guaranteed to be a fixed-width VF? If so, can we avoid making this change here (and instead s/getKnownMinValue/getFixedValue/)? I'm sure we'll want this change at some point when we make the epilogue VF scalable, but perhaps this patch is not the one to change it in.
This fix is needed for correctness in the tests below, i.e. see
; CHECK: [[IDX_NXT]] = add nuw i64 [[IDX]], [[VEC_ITS1]]
Without this fix we end up incrementing the induction variable by the wrong VF, which leads to subsequent crashes in a later pass too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109432/new/
https://reviews.llvm.org/D109432
More information about the llvm-commits
mailing list