PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr65105-1.c
blobb0d901c90bdd4201117895c5a994f0ca06b59bb2
1 /* PR target/pr65105 */
2 /* { dg-do run { target { ia32 } } } */
3 /* { dg-options "-O2 -msse2 -mtune=slm -mno-stackrealign -save-temps" } */
4 /* { dg-require-effective-target sse2 } */
5 /* { dg-final { scan-assembler "por" } } */
6 /* { dg-final { scan-assembler "pand" } } */
8 #include "sse2-check.h"
10 #include "stdlib.h"
12 static int count = 0;
14 void __attribute__((noinline))
15 counter (long long l)
17 count++;
18 if (!l || count > 5)
19 exit (1);
22 void __attribute__((noinline))
23 test (long long *arr)
25 register unsigned long long tmp;
27 tmp = arr[0] | arr[1] & arr[2];
28 while (tmp)
30 counter (tmp);
31 tmp = *(arr++) & tmp;
35 void __attribute__((noinline))
36 fill_data (long long *arr)
38 arr[0] = 0x00ffffffL;
39 arr[1] = 0xffffff00L;
40 arr[2] = 0x00ffffffL;
41 arr[3] = 0x0000ff00L;
42 arr[4] = 0x00ff0000L;
43 arr[5] = 0xff000000L;
46 static void
47 sse2_test (void)
49 long long arr[6];
50 fill_data (arr);
51 test (arr);
53 if (count != 5)
54 __builtin_abort ();