1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */ 3 4 double val1[4][2], val2[4][2], chk[4][2]; 5 6 void foo(void)7foo (void) 8 { 9 int i, j; 10 for (i = 0; i < 4; i++) 11 { 12 double tmp = 0; 13 for (j = 0; j < 2; j++) 14 tmp += val1[i][j] * val2[i][j]; 15 for (j = 0; j < 2; j++) 16 chk[i][j] = tmp; 17 } 18 } 19 20 float val1f[8][2], val2f[8][2], chkf[8][2]; 21 22 void foof(void)23foof (void) 24 { 25 int i, j; 26 for (i = 0; i < 8; i++) 27 { 28 float tmp = 0; 29 for (j = 0; j < 2; j++) 30 tmp += val1f[i][j] * val2f[i][j]; 31 for (j = 0; j < 2; j++) 32 chkf[i][j] = tmp; 33 } 34 } 35