gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-mavx512f -O2" } */ |
| 3 | /* { dg-require-effective-target avx512f } */ |
| 4 | |
| 5 | #include "avx512f-check.h" |
| 6 | #include "avx512f-broadcast-gpr-1.c" |
| 7 | |
| 8 | void |
| 9 | avx512f_test (void) |
| 10 | { |
| 11 | union512i_q q; |
| 12 | union512i_d d; |
| 13 | int i; |
| 14 | |
| 15 | q.x = foo_1 (3); |
| 16 | d.x = foo_2 (5); |
| 17 | |
| 18 | for (i = 0; i < 8; i++) |
| 19 | { |
| 20 | if (q.a[i] != 3) |
| 21 | abort (); |
| 22 | } |
| 23 | |
| 24 | for (i = 0; i < 16; i++) |
| 25 | { |
| 26 | if (d.a[i] != 5) |
| 27 | abort (); |
| 28 | } |
| 29 | } |