Hi,
> Can that be used in other places also in second pass? (TripCount = EPI.TripCount).
Perhaps it could, but I'm not sure why we'd do that? EPI is only available to the interfaces specifically extended for epilogue vectorization, and overwriting TripCount from EPI seems awkward, especially because `getOrCreateTripCount` takes a loop as input.
> is it guaranteed that trip count will always dominate the epilog vector loop and scalar loop ?
The `getOrCreateTripCount` for the original loop is currently first called when generating the first set of tripcount checks in a basic block that dominates the main vector, epilogue vector and the scalar loops. This diagram might help: https://llvm.org/docs/Vectorizers.html#epilogue-vectorization
BTW, the community is migrating away from the dev-mailing list in favour of Discourse. Please post future questions to https://llvm.discourse.group/c/ir-optimizations.
Bardia Mahjour
Compiler Optimizations
IBM Toronto Software Lab
"Venkataramanan Kumar" ---2022/01/26 08:20:58 AM---Hi, We are caching TripCount of a loop in