On Fri, Jan 8, 2016 at 1:38 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Fri, Jan 08, 2016 at 01:27:08PM -0800, H.J. Lu wrote: >> > That is just wrong and will severely pessimize correct code. >> > Please don't waste time on that. >> > >> >> Do you have an example to show it will pessimize correct code? > > Anything where the compiler can't figure out alignment info and you use the > aligned functions, starting from trivial tests like: > > void foo (float *p, __m256 q) > { > _mm256_store_ps (p, q); > } > > etc. The SSE*/AVX* docs say clearly that if the pointer argument is not > properly aligned, a #GP is generated, and you need to use the > *storeu*/*loadu* intrinsics instead. >
How is it `correct' code when alignment of p is unknown? Do you mean you are expecting GP. -- H.J.