[llvm-dev] Trip count re-computation during Epilog vectorization
Venkataramanan Kumar via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 26 05:20:41 PST 2022
Hi,
We are caching TripCount of a loop in
"EpilogueLoopVectorizationInfo.TripCount" during first pass ( Main Loop)
vectorization.
I see we use the cached value at "emitMinimumVectorEpilogueIterCountCheck"
during the second pass( Epilog Vector loop).
--Snip--
BasicBlock *
EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(
Loop *L, BasicBlock *Bypass, BasicBlock *Insert) {
assert(EPI.TripCount &&
"Expected trip count to have been safed in the first pass.");
assert(
(!isa<Instruction>(EPI.TripCount) ||
DT->dominates(cast<Instruction>(EPI.TripCount)->getParent(),
Insert)) &&
"saved trip count does not dominate insertion point.");
Value *TC = EPI.TripCount;
--Snip--
Can that be used in other places also in second pass? (*TripCount =
EPI.TripCount*). In the trunk I see we are recomputing again via
getOrCreateTripCount(L) during the second pass (Epilog vector loop)
is it guaranteed that trip count will always dominate the epilog vector
loop and scalar loop ?
regards,
Venkat.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220126/352b649e/attachment.html>
More information about the llvm-dev
mailing list