[cfe-dev] Alignment of bitfield structs
Renato Golin
renato.golin at linaro.org
Tue Apr 21 02:53:05 PDT 2015
On 21 April 2015 at 10:44, Bradley Smith <bradley.smith at arm.com> wrote:
> From what I understand, the ABI alignment of (the actual) @g should be 4 since it is a struct containing int bitfields, Clang has invented the i40 type. Although as I said, from InstCombine's perspective the ABI alignment is indeed 8 as all it sees is the i40, so I don't believe it is InstCombine in itself that is wrong.
Right, I may be oversimplifying things, but I think Clang is
incorrect, here. It should have created something like { i32, i32 }
instead of { i40 }. InstCombine would probably not mess the alignment
up.
Is that what you mean?
cheers,
--renato
More information about the cfe-dev
mailing list