1 /* { dg-do compile } */ 2 /* { dg-options "-mavx2 -O3 -fopenmp-simd -fdump-tree-vect-details" } */ 3 4 #define N 256 5 int a1[N], a2[N], a3[N], a4[N], a5[N], a6[N], a7[N]; 6 foo()7void foo() 8 { 9 int x1, x2, x3; 10 int i; 11 #pragma omp simd safelen(8) 12 for (i=0; i<N; i++) 13 { 14 x1 = a1[i] + a2 [i]; 15 if (x1 >= 0 && x1 != 3) 16 { 17 x2 = a3[i] - a1[i]; 18 if (x2 >= 0 && x2 != 4) 19 { 20 x3 = a4[i] + a5[i]; 21 if (x3 >= 0 && x3 != 5) 22 { 23 a6[i] = x1 - x2; 24 a7[i] = x3 + x2; 25 } 26 } 27 } 28 } 29 } 30 31 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ 32