Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr91994.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target avx } */
3 /* { dg-options "-O2 -mavx -mvzeroupper" } */
4
5 #include "avx-check.h"
6
7 #include <immintrin.h>
8
9 __m256i x1, x2, x3;
10
11 __attribute__ ((noinline))
12 static void
13 foo (void)
14 {
15 x1 = x2;
16 }
17
18 void
19 bar (void)
20 {
21 __m256i x = x1;
22 foo ();
23 x3 = x;
24 }
25
26 __attribute__ ((noinline))
27 void
28 avx_test (void)
29 {
30 __m256i x = _mm256_set1_epi8 (3);
31 x1 = x;
32 bar ();
33 if (__builtin_memcmp (&x3, &x, sizeof (x)))
34 __builtin_abort ();
35 }