This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: is -O2 breaking sse2 alignment?


Brian Budge wrote:
> Hi -
> 
> I think this might be a little simpler:
> 
> void test_add_long1(long * result, long * a, long * b, long size) {
>     __m128i *A = (__m128i*)a;
>     __m128i *B = (__m128i*)b;
>     __m128i *end = A + size/2;
>     __m128i *R = (__m128i*)result;
> 
>     for(; A < end; ++A, ++B, ++R) {
>         *R = _mm_add_epi64(*A, *B);
>     }
> }

This has the same aliasing problems.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]