[llvm-dev] Alignment of the StoreInst

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 16 12:14:44 PST 2016


Hi Hongbin,

On 16 December 2016 at 11:57, Hongbin Zheng via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> We have an "align 4" in the StoreInst. Does this mean
> 1) the address 'A' should be aligned to 4 bytes?
> 2) the lower 2 bits of 'A' should be always 0?

Yes, these are both the same. It means the compiler will assume those
facts when reasoning about what that store might do and possibly when
choosing what instruction to use to implement it.

Chers.

Tim.


More information about the llvm-dev mailing list