Stop only if there aren't any usable algorithms
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse2-set-epi64x-1.c
blobac32015a72ca2a1514189d721a29752167c5dd73
1 /* { dg-do run } */
2 /* { dg-options "-O2 -msse2" } */
3 /* { dg-require-effective-target sse2 } */
5 #include "sse2-check.h"
7 #ifdef DEBUG
8 #include <stdio.h>
9 #endif
11 #include <emmintrin.h>
13 static void
14 __attribute__((noinline))
15 test (unsigned long long *v)
17 union
19 __m128i x;
20 unsigned long long i[2];
21 } u;
22 unsigned int i;
24 u.x = _mm_set_epi64x (v[1], v[0]);
26 for (i = 0; i < sizeof (v) / sizeof (v[0]); i++)
27 if (v[i] != u.i[i])
29 #ifdef DEBUG
30 printf ("%i: 0x%llx != 0x%llx\n", i, v[i], u.i[i]);
31 #endif
32 abort ();
36 static void
37 sse2_test (void)
39 unsigned long long v[2]
40 = { 0x7B5B546573745665LL, 0x63746F725D53475DLL };
41 test (v);