gcc/testsuite/g++.dg/vect/simd-bool-comparison-2.cc
raw| 1 | // { dg-do compile } |
| 2 | // { dg-additional-options "-mavx512bw -mavx512dq" { target { i?86-*-* x86_64-*-* } } } |
| 3 | |
| 4 | #define N 1024 |
| 5 | |
| 6 | double a[N]; |
| 7 | bool b[N]; |
| 8 | char c[N]; |
| 9 | |
| 10 | void test () |
| 11 | { |
| 12 | int i; |
| 13 | |
| 14 | #pragma omp simd |
| 15 | for (i = 0; i < N; i++) |
| 16 | if ((c[i] > 0) && b[i]) |
| 17 | a[i] = 0.0; |
| 18 | else |
| 19 | a[i] = 1.0; |
| 20 | } |