PATCH: Re: ICE in 920624-1.c with -O3 -funroll-loops on

Jan Hubicka jh@suse.cz
Tue Feb 5 04:55:00 GMT 2002


> Furthermore, other insns don't reference the jump table -- they reference
> the CODE_LABEL before the jump table.  That's the whole point behind leaving
> the CODE_LABEL in the insn stream.  So I have a real hard time seeing why
> it is unsafe to remove the jump table at the same time we convert its 
> associated tablejump/casesi into a simple jump.

Because the label before jumptable is special by the fact that it is not
in code segment for most cases.  By removing the following jumptable you
convert special code_label to not special code_label and create invalid
CFG. Sick, I know. 

You must remove it and convert to NOTE_DELETED_LABEL as code labels other than
tablejump are prohibited outside basic block.  In case we keep the instructions
to compute address in the stream by the accident, we result in accesing code
segment for no putpose.

> Before we switched to rely heavily on the cfg simplifier such cases were
> caught and fixed by running the jump optimizer after any pass which might

This is not correct - it is easy to construct testcases where the jumptable
has been left in the stream with the old jump optimizer.
THey has been removed just in "majority of cases".

Honza



More information about the Gcc-bugs mailing list