HomePhabricator

[SLP] Add detection of shuffled/perfect matching of tree entries.

Authored by ABataev on Apr 20 2021, 5:47 AM.

Description

[SLP] Add detection of shuffled/perfect matching of tree entries.

SLP supports perfect diamond matching for the vectorized tree entries
but do not support it for gathered entries and does not support
non-perfect (shuffled) matching with 1 or 2 tree entries. Patch adds
support for this matching to improve cost of the vectorized tree.

Reviewed By: RKSimon

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