This is an archive of the discontinued LLVM Phabricator instance.

[SLP]Fix a crash when insert subvector is out of range.
ClosedPublic

Authored by ABataev on Jun 17 2022, 10:25 AM.

Details

Summary

If the OffsetBeg + InsertVecSz is greater than VecSz, need to estimate
the cost as shuffle of 2 vector, not as insert of subvector. Otherwise,
the inserted subvector is out of range and compiler may crash.

Diff Detail

Event Timeline

ABataev created this revision.Jun 17 2022, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2022, 10:25 AM
ABataev requested review of this revision.Jun 17 2022, 10:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2022, 10:25 AM
RKSimon retitled this revision from [SLP]Fix a crash when insert sunvector is out of range. to [SLP]Fix a crash when insert subvector is out of range..Jun 17 2022, 11:46 AM
ABataev updated this revision to Diff 438026.Jun 17 2022, 1:14 PM

Adjust OffsetBeg for better shuffle mask estimation.

RKSimon accepted this revision.Jun 18 2022, 3:50 AM

LGTM

This revision is now accepted and ready to land.Jun 18 2022, 3:50 AM
This revision was landed with ongoing or failed builds.Jun 21 2022, 7:19 AM
This revision was automatically updated to reflect the committed changes.