This is an archive of the discontinued LLVM Phabricator instance.

[SLP]No need to mark scatter load pointer as scalar as it gets vectorized.
ClosedPublic

Authored by ABataev on Feb 16 2021, 2:41 PM.

Details

Summary

Pointer operand of scatter loads does not remain scalar in the tree (it
gest vectorized) and thus must not be marked as the scalar that remains
scalar in vectorized form.

Diff Detail

Event Timeline

ABataev created this revision.Feb 16 2021, 2:41 PM
ABataev requested review of this revision.Feb 16 2021, 2:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2021, 2:41 PM
ABataev retitled this revision from [SLP]No need to mark scatter load pointer as scalar as this is gets vectorized. to [SLP]No need to mark scatter load pointer as scalar as it gets vectorized..
anton-afanasyev accepted this revision.Feb 17 2021, 7:40 AM

LGTM

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
2578

We could make the same check inside InTreeUserNeedToExtract(), but here it looks more simple.

This revision is now accepted and ready to land.Feb 17 2021, 7:40 AM