OSDN Git Service

2011-08-19 Andrew Stubbs <ams@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / sse-1.c
1 /* PR 12902 */
2 /* { dg-do compile } */
3 /* { dg-options "-O1 -msse" } */
4
5 #include <xmmintrin.h>
6
7 typedef union
8 {
9   int i[4];
10   float f[4];
11   __m128 v;
12 } vector4_t;
13
14 void
15 swizzle (const void *a, vector4_t * b, vector4_t * c)
16 {
17   b->v = _mm_loadl_pi (b->v, (__m64 *) a);
18   c->v = _mm_loadl_pi (c->v, ((__m64 *) a) + 1);
19 }
20
21 /* While one legal rendering of each statement would be movaps;movlps;movaps,
22    we can implmenent this with just movlps;movlps.  Since we do now, anything
23    less would be a regression.  */
24 /* { dg-final { scan-assembler-not "movaps" } } */
25 /* { dg-final { scan-assembler "movlps" } } */