This is an archive of the discontinued LLVM Phabricator instance.

[SLP]Fix vectorization of insertelements with mutiple uses.
ClosedPublic

Authored by ABataev on May 26 2021, 6:21 AM.

Details

Summary

SLP vectorizer should not consider insertelements with multiple uses as
a part of high level build vector, it must be considered as
a terminating insertelement in the vector build, otherwise it may
produce incorrect code.

Diff Detail

Event Timeline

ABataev created this revision.May 26 2021, 6:21 AM
ABataev requested review of this revision.May 26 2021, 6:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2021, 6:21 AM
RKSimon edited the summary of this revision. (Show Details)May 26 2021, 8:00 AM

Thanks, this fixes the miscompile I'm seeing.

RKSimon accepted this revision.May 26 2021, 9:22 AM

LGTM

This revision is now accepted and ready to land.May 26 2021, 9:22 AM