1 /* { dg-lto-do link } */ 2 /* { dg-require-effective-target vect_simd_clones } */ 3 /* { dg-require-effective-target avx2 } */ 4 /* { dg-lto-options { { -fopenmp-simd -O3 -ffast-math -mavx2 -flto -flto-partition=max } } } */ 5 6 #define SIZE 4096 7 float x[SIZE]; 8 9 10 #pragma omp declare simd 11 float 12 __attribute__ ((noinline)) my_mul(float x,float y)13my_mul (float x, float y) { 14 return x * y; 15 } 16 17 __attribute__ ((noinline)) foo()18int foo () 19 { 20 int i = 0; 21 #pragma omp simd safelen (16) 22 for (i = 0; i < SIZE; i++) 23 x[i] = my_mul ((float)i, 9932.3323); 24 return (int)x[0]; 25 } 26 main()27int main () 28 { 29 int i = 0; 30 for (i = 0; i < SIZE; i++) 31 x[i] = my_mul ((float) i, 9932.3323); 32 foo (); 33 return (int)x[0]; 34 } 35 36