There is no need to update the AlsoPack field when creating
VPReplicateRecipes. It can be easily computed based on the VP def-use
chains when it is needed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Indeed better compute such information on demand than cache it! Looks good to me, adding a couple of nits.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
9573 | nit: may be slightly faster if swapped to check State.VF.isVector() first. | |
llvm/lib/Transforms/Vectorize/VPlan.h | ||
1546 | nit: used by a widened instruction indirectly - via an intervening PredInstPhi? Until the insert-element's are represented explicitly. | |
llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp | ||
929 | This is indeed the current behavior, but better have it check if !U.usesScalars() instead, possibly as a follow-up? |
nit: may be slightly faster if swapped to check State.VF.isVector() first.