gcc/testsuite/gcc.target/i386/avx2-vpcmpeqq-2.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-mavx2 -O2" } */ |
| 3 | /* { dg-require-effective-target avx2 } */ |
| 4 | |
| 5 | #include "avx2-check.h" |
| 6 | |
| 7 | static void |
| 8 | avx2_test (void) |
| 9 | { |
| 10 | union256i_q u, s1, s2; |
| 11 | long long int e[4]; |
| 12 | int i; |
| 13 | |
| 14 | s1.x = _mm256_set_epi64x (1, 2, 3, 4); |
| 15 | |
| 16 | s2.x = _mm256_set_epi64x (88, 44, 3, 220000); |
| 17 | |
| 18 | u.x = _mm256_cmpeq_epi64 (s1.x, s2.x); |
| 19 | |
| 20 | for (i = 0; i < 4; i++) |
| 21 | e[i] = (s1.a[i] == s2.a[i]) ? -1 : 0; |
| 22 | |
| 23 | if (check_union256i_q (u, e)) |
| 24 | abort (); |
| 25 | } |