[LLVMdev] help

Anton Korobeynikov anton at korobeynikov.info
Fri Jul 16 07:31:35 PDT 2010

> In the insrtuction
> %1 = load i32** %y_addr, align 4
> what is the meaning of align 4??
> Can anyone explain?
>From http://llvm.org/docs/LangRef.html#i_load :

"The optional constant align argument specifies the alignment of the
operation (that is, the alignment of the memory address). A value of 0
or an omitted align argument means that the operation has the
preferential alignment for the target. It is the responsibility of the
code emitter to ensure that the alignment information is correct.
Overestimating the alignment results in undefined behavior.
Underestimating the alignment may produce less efficient code. An
alignment of 1 is always safe."

With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

More information about the llvm-dev mailing list