Thomas Zimmermann <kuhundbaer@xxxxxx> writes: > I have a question regarding SIMD built-ins. > > The built-in '__builtin_ia32_loadaps' is mentioned in the GCC manual, > but seems unavailable. Code like > > <quote> > int > main(int argc, char **argv) > { > float __attribute__((aligned(16))) f[4] = {1, 1, 1, 1}; > > v4sf v; > v = __builtin_ia32_loadaps(f); > > exit(EXIT_SUCCESS); > } > </quote> > > results in an error message > > <quote> > gcc -D_GNU_SOURCE=1 -Wall -march=core2 -m64 -mmmx -msse -msse2 -O2 -c -o > main.o main.c > main.c: In function âmainâ: > main.c:13: warning: implicit declaration of function > â__builtin_ia32_loadapsâ > main.c:13: error: incompatible types when assigning to type âv4sfâ from > type âintâ > make: *** [main.o] Fehler 1 > </quote> > > However, the same code with the built-in '__builtin_ia32_loadups' > works. > > I've seen this with GCC 4.4 and 4.6. What am I doing wrong? I recommend using the Intel-define intrinsics from <xmmintrin.h> instead. The __builtin_ia32_loadaps builtin function was removed and the documentation is out of date. The movaps instruction from memory is easily generated using code like #include <xmmintrin.h> __m128 f (__m128 *p) { return *p; } This is another instance of http://gcc.gnu.org/PR20049 . Ian