This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Take user instructions cost into consideration in insertelement vectorization.
ClosedPublic

Authored by ABataev on Jan 29 2018, 12:39 PM.

Details

Summary

For better vectorization result we should take into consideration the
cost of the user insertelement instructions when we try to
vectorize sequences that build the whole vector. I.e. if we have the
following scalar code:

<Scalar code>
insertelement <ScalarCode>, ...

we should consider the cost of the last insertelement instructions as
the cost of the scalar code.

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev created this revision.Jan 29 2018, 12:39 PM
RKSimon accepted this revision.Feb 11 2018, 7:53 AM

LGTM

This revision is now accepted and ready to land.Feb 11 2018, 7:53 AM
This revision was automatically updated to reflect the committed changes.