Re: Worse code after bbro?

2017-01-11 Thread Segher Boessenkool
On Thu, Jan 05, 2017 at 07:39:21PM +0100, Jan Hubicka wrote: > In fact cfglayout was invented to implement bb-reorder originally :) So, hrm, are there any passes we *want* to do in non-cfglayout mode? Segher

Re: Worse code after bbro?

2017-01-05 Thread Senthil Kumar Selvaraj
Segher Boessenkool writes: > On Wed, Jan 04, 2017 at 10:05:49AM +0100, Richard Biener wrote: >> > The code size is identical, but the trunk version executes one more >> > instruction everytime the loop runs (explicit jump to .L5 with trunk vs >> > fallthrough with 4.8) - it's faster only if the

Re: Worse code after bbro?

2017-01-05 Thread Jan Hubicka
> On 01/04/2017 03:46 AM, Segher Boessenkool wrote: > >On Wed, Jan 04, 2017 at 10:05:49AM +0100, Richard Biener wrote: > >>>The code size is identical, but the trunk version executes one more > >>>instruction everytime the loop runs (explicit jump to .L5 with trunk vs > >>>fallthrough with 4.8) -

Re: Worse code after bbro?

2017-01-04 Thread Jeff Law
On 01/04/2017 03:46 AM, Segher Boessenkool wrote: On Wed, Jan 04, 2017 at 10:05:49AM +0100, Richard Biener wrote: The code size is identical, but the trunk version executes one more instruction everytime the loop runs (explicit jump to .L5 with trunk vs fallthrough with 4.8) - it's faster only

Re: Worse code after bbro?

2017-01-04 Thread Segher Boessenkool
On Wed, Jan 04, 2017 at 10:05:49AM +0100, Richard Biener wrote: > > The code size is identical, but the trunk version executes one more > > instruction everytime the loop runs (explicit jump to .L5 with trunk vs > > fallthrough with 4.8) - it's faster only if the loop never runs. This > > happens

Re: Worse code after bbro?

2017-01-04 Thread Richard Biener
On Wed, 21 Dec 2016, Senthil Kumar Selvaraj wrote: > Hi, > > For this C code (slightly modified from PR 30908) > > void wait(int i) > { > while (i-- > 0) > asm volatile("nop" ::: "memory"); > } > > gcc 4.8 at -Os produces > > jmp .L2 > .L3: > nop >

Worse code after bbro?

2016-12-21 Thread Senthil Kumar Selvaraj
Hi, For this C code (slightly modified from PR 30908) void wait(int i) { while (i-- > 0) asm volatile("nop" ::: "memory"); } gcc 4.8 at -Os produces jmp .L2 .L3: nop decl%edi .L2: testl %edi, %edi jg .L3