Re: [PATCH] make find_taken_edge handle case with just default

2017-06-30 Thread Peter Bergner
On 6/30/17 3:27 AM, Richard Biener wrote: > On Thu, 29 Jun 2017, Peter Bergner wrote: >> On 6/29/17 8:58 AM, Richard Biener wrote: >>> We can also merge both loops, counting new_size upwards, storing >>> to label new_size if new_size != i ... >> >> Like this. I'm bootstrapping and regtesting the f

Re: [PATCH] make find_taken_edge handle case with just default

2017-06-30 Thread Richard Biener
On Thu, 29 Jun 2017, Peter Bergner wrote: > On 6/29/17 8:58 AM, Richard Biener wrote: > > On Thu, 29 Jun 2017, Peter Bergner wrote: > > > >> On 6/29/17 4:03 AM, Richard Biener wrote: > >>> > >>> This refactors things a bit to make CFG cleanup handle switches with > >>> just a default label. If w

Re: [PATCH] make find_taken_edge handle case with just default

2017-06-29 Thread Peter Bergner
On 6/29/17 8:58 AM, Richard Biener wrote: > On Thu, 29 Jun 2017, Peter Bergner wrote: > >> On 6/29/17 4:03 AM, Richard Biener wrote: >>> >>> This refactors things a bit to make CFG cleanup handle switches with >>> just a default label. If we make sure to cleanup the CFG after >>> group_case_label

Re: [PATCH] make find_taken_edge handle case with just default

2017-06-29 Thread Richard Biener
On Thu, 29 Jun 2017, Peter Bergner wrote: > On 6/29/17 8:58 AM, Richard Biener wrote: > > On Thu, 29 Jun 2017, Peter Bergner wrote: > >> Should we offer an early out of group_case_labels_stmt() for the > >> fairly common case of new_size == old_size? There's no reason to > >> execute the compress

Re: [PATCH] make find_taken_edge handle case with just default

2017-06-29 Thread Peter Bergner
On 6/29/17 8:58 AM, Richard Biener wrote: > On Thu, 29 Jun 2017, Peter Bergner wrote: >> Should we offer an early out of group_case_labels_stmt() for the >> fairly common case of new_size == old_size? There's no reason to >> execute the compress labels loop if we didn't combine any of the >> label

Re: [PATCH] make find_taken_edge handle case with just default

2017-06-29 Thread Richard Biener
On Thu, 29 Jun 2017, Peter Bergner wrote: > On 6/29/17 4:03 AM, Richard Biener wrote: > > > > This refactors things a bit to make CFG cleanup handle switches with > > just a default label. If we make sure to cleanup the CFG after > > group_case_labels removes cases with just __builtin_unreachabl

Re: [PATCH] make find_taken_edge handle case with just default

2017-06-29 Thread Peter Bergner
On 6/29/17 4:03 AM, Richard Biener wrote: > > This refactors things a bit to make CFG cleanup handle switches with > just a default label. If we make sure to cleanup the CFG after > group_case_labels removes cases with just __builtin_unreachable () > inside then this fixes the ICE seen in PR81994

[PATCH] make find_taken_edge handle case with just default

2017-06-29 Thread Richard Biener
This refactors things a bit to make CFG cleanup handle switches with just a default label. If we make sure to cleanup the CFG after group_case_labels removes cases with just __builtin_unreachable () inside then this fixes the ICE seen in PR81994 as well. I wonder if find_taken_edge should genera