Page MenuHomePhabricator

[SLP]Unify vectorization of PHI and store nodes with improved tiny tree vectorization.
ClosedPublic

Authored by ABataev on Sep 15 2021, 8:26 AM.

Details

Summary

Vectorization of PHIs and stores very similar, it might be beneficial to
try to revectorize stores (like PHIs) if the total number of stores with
the same/alternate opcode is less than the vector size but number of
stores with the same type is larger than the vector size.

Diff Detail

Event Timeline

ABataev created this revision.Sep 15 2021, 8:26 AM
ABataev requested review of this revision.Sep 15 2021, 8:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 15 2021, 8:26 AM

Split this into two unrelated parts? One for the tree building and the second one for the sequence vectorization.

llvm/test/Transforms/SLPVectorizer/X86/tiny-tree.ll
310–311

Fix test name: not "gather" now.

ABataev updated this revision to Diff 374205.Sep 22 2021, 6:27 AM

Rebase + address comments.

Split this into two unrelated parts? One for the tree building and the second one for the sequence vectorization.

@ABataev Is it worth to split this into two parts?

Split this into two unrelated parts? One for the tree building and the second one for the sequence vectorization.

@ABataev Is it worth to split this into two parts?

Ok, will do.

No objections - @anton-afanasyev any comments ? By splitting did you mean pull out the NFC refactor of the PHI handling first and then add support for store groups?

No objections - @anton-afanasyev any comments ? By splitting did you mean pull out the NFC refactor of the PHI handling first and then add support for store groups?

It's already splitted, the other part is commited. @ABataev, please remove relevant part from summary.

ABataev updated this revision to Diff 380752.Tue, Oct 19, 11:58 AM

Rebase + adjust summary

ABataev edited the summary of this revision. (Show Details)Tue, Oct 19, 11:59 AM
RKSimon accepted this revision.Wed, Oct 20, 9:20 AM

LGTM - cheers

This revision is now accepted and ready to land.Wed, Oct 20, 9:20 AM