This is an archive of the discontinued LLVM Phabricator instance.

[VectorCombine] Enable transform 'scalarizeLoadExtract' for scalable vector types
Needs ReviewPublic

Authored by benshi001 on Sep 1 2023, 12:50 AM.

Details

Summary

The transform 'scalarizeLoadExtract' can be applied to scalable
vector types if the index is less than the minimum number of elements.

Diff Detail

Event Timeline

benshi001 created this revision.Sep 1 2023, 12:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2023, 12:50 AM
benshi001 requested review of this revision.Sep 1 2023, 12:50 AM
benshi001 updated this revision to Diff 555297.Sep 1 2023, 12:53 AM
benshi001 added inline comments.Sep 1 2023, 12:57 AM
llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
97

For scalable vector types, only the index is guaranteed to be less than the minimum length, then this transform is allowed.

benshi001 updated this revision to Diff 555617.Sep 3 2023, 12:17 AM
benshi001 updated this revision to Diff 555619.Sep 3 2023, 12:26 AM
benshi001 added inline comments.Sep 3 2023, 12:32 AM
llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
268

This is not optimized due to there is no guaranteed that index is less than the minimum length of a scalable vector.

nikic added a comment.Nov 13 2023, 6:22 AM

Abandon this and the parent revision, as they were migrated to GitHub?