Displaying 1 result from an estimated 1 matches for "natural_alignment".
2020 Jun 24
2
Over-alignment of globals?
Hi,
If we specify an explicit alignment attribute for globals (either at
the Clang or LLVM IR level) we get asm alignment directives with
values that seem to be `max(natural_alignment, specified_alignment)`.
This seems to happen for multiple archs. GCC instead just emits the
asked-for alignment. Is there a good reason for this LLVM behavior?
Example:
https://godbolt.org/z/B5ZcN_ (Clang)
https://godbolt.org/z/qpV7PV (GCC)
Thanks,
Luís