Page MenuHomePhabricator

[SLP] Fix PR40310: The reduction nodes should stay scalar.
ClosedPublic

Authored by ABataev on Jan 16 2019, 6:36 AM.

Details

Summary

Sometimes the SLP vectorizer tries to vectorize the horizontal reduction
nodes during regular vectorization. This may happen inside of the loops,
when there are some vectorizable PHIs. Patch fixes this by checking if
the node is the reduction node and thus it must not be vectorized, it must
be gathered.

Diff Detail

Event Timeline

ABataev created this revision.Jan 16 2019, 6:36 AM
fedor.sergeev accepted this revision.Jan 16 2019, 7:04 AM

Looks good.
Thanks for a taking care of this!

As I already mentioned in PR40310, this fix passes all my local tests which were failing with horizontal reduction.

This revision is now accepted and ready to land.Jan 16 2019, 7:04 AM
This revision was automatically updated to reflect the committed changes.