No need to recalculate the cost of extractelements, just no need to
compensate the cost of all extractelements, need to check before if this
is actually going to be removed at the vectorization. Also, no need to
generate new extractelement instruction, we may just regenerate the
original one. It may improve the final vectorization.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Transforms/SLPVectorizer/X86/extractelement.ll | ||
---|---|---|
80 ↗ | (On Diff #347071) | this looks like a NFC regeneration? |
llvm/test/Transforms/SLPVectorizer/X86/extractelement.ll | ||
---|---|---|
80 ↗ | (On Diff #347071) | Not quite, the order of extractelements has changed |
llvm/test/Transforms/SLPVectorizer/X86/extractelement.ll | ||
---|---|---|
80 ↗ | (On Diff #347071) | I will investigate why it happens. |
Comment Actions
Reworked the patch, had to make changes for the vectorizable extractelements compensation cost. Also, we were not quite correct when trying to check for the vectorized users, need to check also if the instruction is going to be vectorized as a reduction value. Otherwise we could be too optimistic in non-reduction cases (when extractelements are the seeds and their user is not actually in the vectorization graph).