[Bug c++/68484] _mm_storel_epi64((__m128i *)x, m); does nothing if "x" is a "volatile" ptr

2015-11-23 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68484 --- Comment #3 from Marc Glisse --- (In reply to Vladimir Sedach from comment #2) > It is not just about "long long". It isn't about long long at all, it is about whether your code is valid. In your latest example, you are casting an int* to a

[Bug c++/68484] _mm_storel_epi64((__m128i *)x, m); does nothing if "x" is a "volatile" ptr

2015-11-22 Thread vvsed at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68484 --- Comment #2 from Vladimir Sedach --- It is not just about "long long". _mm_store_ps() is also wrong, while _mm_store_pd() / _mm_store_si128() are OK: #include #include int main(int argc, const char *argv[]) {

[Bug c++/68484] _mm_storel_epi64((__m128i *)x, m); does nothing if "x" is a "volatile" ptr

2015-11-22 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68484 --- Comment #1 from Marc Glisse --- -fno-strict-aliasing The intrinsic is implemented inline as: *(long long *)__P = ... which exposes the strict aliasing. I don't know how much we want to promise for those functions. It would be possible to use