This is an archive of the discontinued LLVM Phabricator instance.

Allow IRInterpreter to deal with non-power-of-2 sized types to support some bitfield accesses.
ClosedPublic

Authored by friss on Aug 24 2018, 6:14 PM.

Details

Summary

For some bitfield patterns (like the one added by this commit), Clang will
generate non-regular data types like i24 or i48. This patch follows a
pretty naive approach of just bumping the type size to the next power of 2.
DataExtractor know how to deal with weird sizes. The operations on Scalar
do not know how to deal with those types though, so we have to legalize the
size when creating a Scalar.

Event Timeline

friss created this revision.Aug 24 2018, 6:14 PM
clayborg accepted this revision.Aug 28 2018, 7:16 AM
This revision is now accepted and ready to land.Aug 28 2018, 7:16 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.