Auto-vectorization: need to know what to expect

Benoît Jacob jacob@math.jussieu.fr
Mon Mar 17 21:52:00 GMT 2008


Thanks a lot Michael for the detailed help!

Thanks also n8tm, and sorry to have posted on the wrong list.

Well that's a lot of food for thought and it'll keep me busy for some time,
so thanks again to all, and bye!

Benoit

On Monday 17 March 2008 20:08:43 Michael Meissner wrote:
> However, SSE instructions need 128-bit alignment, not 64-bit alignment that
> -malign-double would give.  You can align the arrays yourself with the
> __attribute__((__aligned__(16))) declaration, or use a union that has an
> element with 16-byte alignment (vector element, such as __m128, __m128d,
> __m128i or long double and -m128bit-long-double).  Note, if the arrays are
> auto rather than static, you probably need to use the -mstackrealign and
> -mpreferred-stack-boundary=16 as well.
>
> It might be nice to think about an option that automatically aligns large
> arrays without having to do the declaration (or even have the vectorizer
> override the alignment for statics/auto).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20080317/1065c067/attachment.sig>


More information about the Gcc mailing list