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