This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] doloop_optimize miscompiles openssl
Franz Sirl writes:
> Hmm, already lying in bed, it occurred to me that I'm not sure about the
> exact definition for loop->exit_count. I seem to remember (I can't test
> right now) that it was set to 3 for the testcase, this would mean the main
> loop exit isn't counted here and I have to compare for >0, not >1.
Unfortunately, some of this is rather ad-hoc and is one of the reasons
I'm rewriting the loop optimizer to use the CFG. Reading between the
lines, I assume that loop->exit_count is 3 but
loop_info->has_multiple-exit_targets is 0 for your testcase?
> In the meantime, while browsing the code, I found another suspicious code
> Do we need to prefer loop->top here too? The comment doesn't specify if the
> initialization is needed on every loop run...
> Maybe the originator of the code should comment on the patches?
It's only needed once before the loop starts.
> BTW, I will try to turn both testcases in this thread into executable
This would be useful. I haven't had a chance to look at this thread
yet; could you post me a simple testcase?