This is an archive of the discontinued LLVM Phabricator instance.

[Scalarizer] Improve extractelement handling when returned type is vector pointer (PR54469)
AbandonedPublic

Authored by yurai007 on Apr 13 2022, 8:43 AM.

Details

Summary

This patch learn ScalarizerVisitor how to scalarize cases like
load(..., extractelement(...)) and store(..., extractelement(...)) where extractelement returns vector pointer.
We avoid "Inconsistent vector sizes" failure by careful choice of instructions stored in
Scattered and Gathered collections when one of above cases is detected.

Diff Detail

Event Timeline

yurai007 created this revision.Apr 13 2022, 8:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 8:43 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
yurai007 requested review of this revision.Apr 13 2022, 8:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 8:43 AM

TODO: one more test proving that only loads and stores are relevant?

Yes, this change should fix the crash :)

yurai007 retitled this revision from [Scalarizer] Handle extractelement returning vector pointer (PR54469) to [Scalarizer] Improve extractelement handling when returned type is vector pointer (PR54469).Apr 13 2022, 12:09 PM
yurai007 updated this revision to Diff 423283.Apr 17 2022, 2:49 AM

More tests fixing TODO.

yurai007 updated this revision to Diff 423284.Apr 17 2022, 3:00 AM

isExtractElementReturningVectorPointer update with cosmetic changes.

lebedev.ri resigned from this revision.Jan 12 2023, 5:30 PM

This review may be stuck/dead, consider abandoning if no longer relevant.
Removing myself as reviewer in attempt to clean dashboard.

yurai007 abandoned this revision.Jan 16 2023, 6:40 AM