https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99633
Bug ID: 99633 Summary: s1113 benchmark of TSVC is unrolled by icc and not by gcc and runs faster on znver3 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: hubicka at gcc dot gnu.org Target Milestone: --- typedef float real_t; #define iterations 100000 #define LEN_1D 32000 #define LEN_2D 256 // array definitions real_t a[LEN_1D],b[LEN_1D],c[LEN_1D],d[LEN_1D],e[LEN_1D]; int main(struct args_t * func_args) { // linear dependence testing // one iteration dependency on a(LEN_1D/2) but still vectorizable //initialise_arrays(__func__); //gettimeofday(&func_args->t1, NULL); for (int nl = 0; nl < 2*iterations; nl++) { for (int i = 0; i < LEN_1D; i++) { a[i] = a[LEN_1D/2] + b[i]; } //dummy(a, b, c, d, e, aa, bb, cc, 0.); } return a[10]; } Is unrolled twice by icc and runs 1.5s instead of 2.6s when built with gcc. -funroll-loops fixes the issue, but it suggests we may want to unroll by default on zver3