This is the mail archive of the
mailing list for the GCC project.
Re: Hopelessly broken loop_father, loop_depth
On Sun, Aug 12, 2012 at 2:02 PM, Steven Bosscher <firstname.lastname@example.org> wrote:
> On Sat, Aug 11, 2012 at 11:16 PM, Steven Bosscher <email@example.com> wrote:
>> Lots of test cases fail with the attached patch.
> Lots still fail after correcting the verifier :-)
> 920723-1.c: In function 'f':
> 920723-1.c:14:1: error: bb 13 has loop depth 2, should be 1
> f (int count, vector_t * pos, double r, double *rho)
> 920723-1.c:14:1: error: bb 14 has loop depth 2, should be 1
> 920723-1.c:14:1: internal compiler error: in verify_loop_structure, at
That's a pre-existing bug in unswitching. When unswitching
simplifies the condition it unswitches on using simplify_using_entry_checks
it may turn an inner loop into an exit to an endless loop. But it does
not modify the loop stucture according to this change.
void foo (int x, int r)
if (r >= x)
if (r >= x)
simplified testcase that even fails at -O1. We mostly rely on cfg-cleanup
to fixup loops for us, so this is one case it does not handle properly.
The quest of keeping loops up-to-date is hard ... but thanks for the checking