PR 41469 followup: improve __builtin_stack_restore removal

Richard Henderson rth@redhat.com
Wed Nov 4 22:28:00 GMT 2009


On 11/04/2009 02:06 PM, Eric Botcazou wrote:
> This breaks the newly enabled ACATS test cb1010c at -O on x86-64: a
> __builtin_stack_restore just before a RESX is eliminated in a cleanup.
>
> I presume that's wrong...

It's only wrong if the RESX resolves within the function, i.e. the block 
has successors.  If there are no successors to the bb, then we're about 
to (effectively) perform a longjmp, and there's no point in keeping the 
stack restore.

But we already check for zero successors or a single EXIT successor, so 
I'm not sure what's wrong with the current code.  Can you describe the 
failure in more detail, or do I need to debug it myself.


r~



More information about the Gcc-patches mailing list