No need to count the final shuffle cost for the constants, gathering of
the constants is just a constant vector + extra inserts, if required.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
5606 | Could you a comment here mentioning that gathering from constants does not need shuffles? Or perhaps make it more explicit by renaming this variable to GatherFromConstants = true and resetting it if any of the VL elements is not a constant? |
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | ||
---|---|---|
5606 | It is set not only if the value is not constant but also if the same value was already counter for gathering. Will rename to DuplicateNonConst |
Could you a comment here mentioning that gathering from constants does not need shuffles? Or perhaps make it more explicit by renaming this variable to GatherFromConstants = true and resetting it if any of the VL elements is not a constant?