PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse4_1-movntdqa.c
blobbc5cf23839ce70b711faabc9842bbf90b565e738
1 /* { dg-do run } */
2 /* { dg-require-effective-target sse4 } */
3 /* { dg-options "-O2 -msse4.1" } */
5 #ifndef CHECK_H
6 #define CHECK_H "sse4_1-check.h"
7 #endif
9 #ifndef TEST
10 #define TEST sse4_1_test
11 #endif
13 #include CHECK_H
15 #include <smmintrin.h>
16 #include <string.h>
18 #define NUM 20
20 static void
21 init_movntdqa (int *src)
23 int i, j, sign = 1;
25 for (i = 0; i < NUM; i++)
26 for (j = 0; j < 4; j++)
28 src[i * 4 + j] = j * i * i * sign;
29 sign = -sign;
33 static void
34 TEST (void)
36 union
38 __m128i x[NUM];
39 int i[NUM * 4];
40 } dst, src;
41 int i;
43 init_movntdqa (src.i);
45 for (i = 0; i < NUM; i++)
46 dst.x[i] = _mm_stream_load_si128 (&src.x[i]);
48 for (i = 0; i < NUM; i++)
49 if (memcmp (&dst.x[i], &src.x[i], sizeof(src.x[i])))
50 abort ();