Loop unroll spends a lot of time in SCEVs processing in case when a function
contains hundreds of simple 'for' loops with a quite complex arrays indexes like
for (int i = 0; i < 8; ++i) { for (int j = 0; j < 32; ++j) { C[j*8+i] = B[j*32+i+128] + A[i*64+128]; } } for (int i = 0; i < 8; ++i) { for (int j = 0; j < 8; ++j) { for (int k = 0; k < 32; ++k) { D[k*64+i*8+j] = D[k*64+i*8+j] + E[i+16] * C[k*8+j+256]; } } }
The patch improves loop unroll speed since isLoopBackedgeGuardedByCond takes
much less time than isLoopEntryGuardedByCond in the edge case.