Debian Codegraph @

gcc/testsuite/gcc.target/i386/avx512f-pr84786-1.c

raw
1 /* PR target/84786 */
2 /* { dg-do run { target { ! ia32 } } } */
3 /* { dg-options "-mavx512f -mno-avx512vl -O2" } */
4 /* { dg-require-effective-target avx512f } */
5
6 #include "avx512f-check.h"
7
8 typedef double V __attribute__((vector_size (16)));
9
10 __attribute__((noipa)) V
11 foo (V x, double y)
12 {
13 register double z __asm ("xmm18");
14 asm volatile ("" : "=v" (z) : "0" (y));
15 x[1] = z;
16 return x;
17 }
18
19 static void
20 avx512f_test (void)
21 {
22 V a = foo ((V) { 1.0, 2.0 }, 3.0);
23 if (a[0] != 1.0 || a[1] != 3.0)
24 abort ();
25 }