[llvm-commits] [llvm] r91614 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Duncan Sands baldrick at free.fr
Wed Jan 6 07:55:25 PST 2010


Hi Ken,

> Perhaps I'm misunderstanding, but with this approach, wouldn't a store
> of i64 with an alignment of 2 expand to two i24 stores and one i16 store
> since the largest legal type of alignment 2 is i24? (Presumably the one
> unaligned i24 store would need to be further expanded to an i16 and an
> i8 store).

yes, but that's correct!  Remember I'm talking about *legal* types here,
not simple types.  If the processor supports i24 stores and i16 stores,
then storing two lots of i24 and one lot of i16 seems like a good thing
to do.  Maybe it's best to check not that the type is legal, but that
stores of the type are legal (since there might be i24 registers but
no store operation for them).

> A store of an i64 with an alignment of 4 would result in two i32 stores.
> Is that what you meant?

Yup - that's what you get now, right?

Ciao,

Duncan.




More information about the llvm-commits mailing list