This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Bytecode] Ensure `dataIt` is aligned coming out of `EncodingReader::alignTo`.
ClosedPublic

Authored by bzcheeseman on Nov 11 2022, 11:22 AM.

Details

Summary

This addresses the TODO in the code previously and checks that the address of dataIt is properly aligned to the requested alignment.

Diff Detail

Event Timeline

bzcheeseman created this revision.Nov 11 2022, 11:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2022, 11:22 AM
bzcheeseman requested review of this revision.Nov 11 2022, 11:22 AM
rriddle accepted this revision.Nov 12 2022, 2:50 AM

Is there a test we could write for this?

This revision is now accepted and ready to land.Nov 12 2022, 2:50 AM

Is there a test we could write for this?

Honestly I'm not sure how you'd ever hit this case given that dataIt was just aligned by the previous while loop. I actually debated just making it an assert cause the only time I could think of it might happen is if the address is changed under the hood or something.