This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Correct alignment settings for vector registers.
ClosedPublic

Authored by HsiangKai on Jan 14 2021, 10:58 PM.

Details

Summary

According to "9. Vector Memory Alignment Constraints" in V specification, the alignment of vector memory access is aligned to the size of the element. In our current implementation, we support ELEN up to 64. We could assume the alignment of vector registers is 64 under the assumption.

Diff Detail

Event Timeline

HsiangKai created this revision.Jan 14 2021, 10:58 PM
HsiangKai requested review of this revision.Jan 14 2021, 10:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2021, 10:58 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
frasercrmck accepted this revision.Jan 15 2021, 7:15 AM

Makes sense to me. I think we'll have to handle "misaligned" vectors at some point too, since the DataLayout can only represent the alignment of vectors based on their overall size.

This revision is now accepted and ready to land.Jan 15 2021, 7:15 AM