[LV] Re-use TripCount from EPI.TripCount.
authorFlorian Hahn <flo@fhahn.com>
Fri, 1 Apr 2022 12:47:34 +0000 (13:47 +0100)
committerFlorian Hahn <flo@fhahn.com>
Fri, 1 Apr 2022 12:47:34 +0000 (13:47 +0100)
commita08c90a4023f8cf72aa8632b0e8d4e77c398ad4b
tree213f8c2e63a7d23cb9cd9a7505b631f11bd6dab8
parentabffdd88767791ef6da4d2df7ec7ab158eb8b775
[LV] Re-use TripCount from EPI.TripCount.

During skeleton construction for the epilogue vector loop, generic
helpers use getOrCreateTripCount, which will re-expand the trip count
computation. Instead, re-use the TripCount created during main loop
vectorization.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/intrinsiccost.ll
llvm/test/Transforms/LoopVectorize/X86/intrinsiccost.ll
llvm/test/Transforms/LoopVectorize/X86/invariant-load-gather.ll
llvm/test/Transforms/LoopVectorize/X86/invariant-store-vectorization.ll