My apologies, it is indeed not a direct answer to your Q and could be refreshed with some of the following.
Here is a more targeted discussion on memref<...xT>
.
In the particular case of x86 and T = vector<4xf32>
:
sizeof(T) == 16B, align(T) == 16B, sizeof(f32) == 1B, align(f32) == 1B
.
By default on x86, the alignment will be the next power of 2, so for vector<6xf32>
, it will be 32B as LLVM introduces padding. Bitcasting in such cases has to be done in a very specific way to avoid manipulating padding data (i.e. garbarge).
This discussion related to individual bits and addressing from memory is related and may also be interesting to you.