Re: [PATCH] Improve niters brute force (PR tree-optimization/77975)

2017-03-09 Thread Richard Biener
On Thu, 9 Mar 2017, Jakub Jelinek wrote: > Hi! > > As you know, this is mostly your patch, I've just added some comments, > testcase and a small optimization; I believe the fix is right, if next[j] > is constant in addition to val[j] (for both args or op[1-j] is constant), > the loop can have 0(1

[PATCH] Improve niters brute force (PR tree-optimization/77975)

2017-03-09 Thread Jakub Jelinek
Hi! As you know, this is mostly your patch, I've just added some comments, testcase and a small optimization; I believe the fix is right, if next[j] is constant in addition to val[j] (for both args or op[1-j] is constant), the loop can have 0(1), 1(2) or infinite iterations, and we can just brute