On Mar 10, 2016 1:21 PM, "Eirik Byrkjeflot Anonsen"
wrote:
>
> Ian Romanick writes:
>
> > From: Ian Romanick
> >
> > I don't understand why the old code was bad, but the new code is fine.
>
> Probably because the *loop counter* can no longer overflow. Thus the
> loop can be optimized. The fact t
Ian Romanick writes:
> From: Ian Romanick
>
> I don't understand why the old code was bad, but the new code is fine.
Probably because the *loop counter* can no longer overflow. Thus the
loop can be optimized. The fact that "i" might overflow has become
irrelevant to the warning.
(And from that
From: Ian Romanick
I don't understand why the old code was bad, but the new code is fine.
brw_state_dump.c: In function ‘brw_debug_batch’:
brw_state_dump.c:677:4: warning: cannot optimize loop, the loop counter may
overflow [-Wunsafe-loop-optimizations]
for (i = 0; i < size / 4; i += 4) {