[PATCH 2/3] cfgcleanup: Fold jumps and conditional branches with returns

2016-05-03 Thread Segher Boessenkool
This patch makes cfgcleanup optimize jumps to returns. There are three cases this handles: -- A jump to a return; this is simplified to just that return. -- A conditional branch to a return; simplified to a conditional return. -- A conditional branch that falls through to a return. This is simpl

Re: [PATCH 2/3] cfgcleanup: Fold jumps and conditional branches with returns

2016-05-10 Thread Christophe Lyon
On 3 May 2016 at 08:59, Segher Boessenkool wrote: > This patch makes cfgcleanup optimize jumps to returns. There are three > cases this handles: > > -- A jump to a return; this is simplified to just that return. > -- A conditional branch to a return; simplified to a conditional return. > -- A con

Re: [PATCH 2/3] cfgcleanup: Fold jumps and conditional branches with returns

2016-05-10 Thread Segher Boessenkool
On Tue, May 10, 2016 at 09:33:56PM +0200, Christophe Lyon wrote: > This patch causes an ICE on gcc.dg/20010822-1.c for target arm-none-eabi > --with-cpu=cortex-a9 That is PR71028, I sent a patch to fix it, will commit in a minute. (See https://gcc.gnu.org/ml/gcc-patches/2016-05/msg00673.html ). S

Re: [PATCH 2/3] cfgcleanup: Fold jumps and conditional branches with returns

2016-05-11 Thread Christophe Lyon
On 11 May 2016 at 01:26, Segher Boessenkool wrote: > On Tue, May 10, 2016 at 09:33:56PM +0200, Christophe Lyon wrote: >> This patch causes an ICE on gcc.dg/20010822-1.c for target arm-none-eabi >> --with-cpu=cortex-a9 > > That is PR71028, I sent a patch to fix it, will commit in a minute. > (See h