On 10/02/2015 05:15 AM, Renlin Li wrote:
Hi Jeff,
Your patch causes an ICE regression.
The test case is " gcc.c-torture/compile/pr27087.c", I observed it on
aarch64-none-elf target when compiling the test case with '-Os' flag.
A quick check shows, the cfg has been changed, but the loop information
is not updated. Thus the information about the number of basic block in
a loop is not reliable.
Could you please have a look?
Appears to be pretty simple. If we collapse a conditional inside a
loop, then we need to set the loop state as needing fixups.
In this specific case we have a conditional where one path eventually
leads back to the loop latch block, the other path exits the loop. We
statically determine the conditional will always take us to the loop exit.
That has the side effect of making the block with the collapsed
conditional no longer part of the loop, it's actually part of the exit
path. That changes the number of nodes in the loop, what edge(s) are
the exit path(s) and possibly other stuff.
I'm running a fix through testing now.
Thanks,
jeff