Re: [Mesa-dev] [PATCH 2/3] glsl: check if induction var incremented before use in terminator

2017-09-18 Thread Nicolai Hähnle
On 14.09.2017 06:47, Timothy Arceri wrote: do-while loops can increment the starting value before the condition is checked. e.g. do { ndx++; } while (ndx < 3); This commit changes the code to detect this and reduces the iteration count by 1 if found. With Eric's remark fixes, this

Re: [Mesa-dev] [PATCH 2/3] glsl: check if induction var incremented before use in terminator

2017-09-14 Thread Eric Engestrom
On Thursday, 2017-09-14 14:47:49 +1000, Timothy Arceri wrote: > do-while loops can increment the starting value before the > condition is checked. e.g. > > do { > ndx++; > } while (ndx < 3); > > This commit changes the code to detect this and reduces the > iteration count by 1 if found.

[Mesa-dev] [PATCH 2/3] glsl: check if induction var incremented before use in terminator

2017-09-13 Thread Timothy Arceri
do-while loops can increment the starting value before the condition is checked. e.g. do { ndx++; } while (ndx < 3); This commit changes the code to detect this and reduces the iteration count by 1 if found. --- src/compiler/glsl/loop_analysis.cpp | 38