[llvm-commits] [llvm] r46349 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Chris Lattner
clattner at apple.com
Fri Jan 25 09:19:31 PST 2008
On Jan 25, 2008, at 8:37 AM, Duncan Sands wrote:
>>> PS: Does an alignment of 0 mean the ABI alignment or the preferred
>>> alignment? I'm guessing that it means ABI for globals and
>>> preferred for allocas.
>>
>> In what context?
>
> In any context :) Basically I'm asking what it means if you pass an
> alignment of 0 for an alloca (or a global). For example, llvm-gcc
> uses alignment 0 for an alloca if the ABI alignment equals the gcc
> alignment. But if the alloca gets the preferred alignment in the
> end (at codegen time) and this differs from the ABI alignment, then
> this would be wrong.
It looks like selectiondagisel is using the max(requested alignment,
preferred alignment) for the type for allocas. This makes sense.
-Chris
More information about the llvm-commits
mailing list