https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99411
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|s311 benchmark of TSVC is |s311 and s31111 benchmark |vectorized by clang better |of TSVC is vectorized by |than by gcc |clang better than by gcc --- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> --- I think this is same case typedef float real_t; #define iterations 1000000 #define LEN_1D 32000 #define LEN_2D 256 real_t a[LEN_1D]; real_t test(real_t* A){ real_t s = (real_t)0.0; for (int i = 0; i < 4; i++) s += A[i]; return s; } int main() { // reductions // sum reduction real_t sum; for (int nl = 0; nl < 2000*iterations; nl++) { sum = (real_t)0.; sum += test(a); sum += test(&a[4]); sum += test(&a[8]); sum += test(&a[12]); sum += test(&a[16]); sum += test(&a[20]); sum += test(&a[24]); sum += test(&a[28]); } return sum>4; }