[LLVMdev] Possible DAGCombiner or TargetData Bug

David Greene dag at cray.com
Fri Feb 20 16:02:52 PST 2009


On Friday 20 February 2009 17:53, Dan Gohman wrote:

> > Yes, and it fixes the problem.
>
> Cool.  I've committed this on trunk now.  If you have a reasonably
> reduced
> testcase for this, please add it.

Working on it.  I'm getting our build validated first.

> The purpose of ABI alignment is to govern things like struct layouts,
> global
> variables, allocas, and so on. So SSE types on x86 should probably all
> remain ABI-aligned at 16 bytes.

Ok, makes sense.

> I think the particular DAGCombine you pointed out is using ABI alignment
> as a conservative heuristic.  In some cases it may be safe to
> transform the
> store to a store that doesn't have the ABI alignment for the stored
> value,
> but DAGCombine doesn't know when it's safe.  I guess this could be fixed
> by having the target provide a third kind of alignment value: the
> minimum
> alignment that the target can store values of a particular type to.

Yes, that would provide more information.  I'm not sure how critical it is.  
My concern is whether someone might think "ABI alignment" is equivalent to 
"safe alignment."

If there were a third option, we would somehow want to discriminate based on 
vector element type.

                                                   -Dave



More information about the llvm-dev mailing list