HomePhabricator

[SLP]Improve cost estimation/emission of externally used extractelements.

Authored by ABataev on May 21 2021, 10:09 AM.

Description

[SLP]Improve cost estimation/emission of externally used extractelements.

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.

Differential Revision: https://reviews.llvm.org/D102933