accessing __m128 fields across compilers
I've noticed that accessing __m128 fields by index is possible in gcc , without using the union trick. __m128 t; float r(t[0] + t[1] + t[2] + t[3]); I can also load a __m128 just like an array: __m128 t{1.f, 2.f, 3.f, 4.f}; This is all in line with gcc 's vector extensions. These, however, may not be available elsewhere. Are the loading and accessing features supported by the intel compiler and msvc? To load a __m128 , you can write _mm_setr_ps(1.f, 2.f, 3.f, 4.f) , which is supported by GCC, ICC, MSVC and clang. So far as I know, clang and recent versions of GCC support accessing __m128