Re: input address reload issue

2017-01-12 Thread Aurelien Buhrig
On 09/01/2017 19:35, Jeff Law wrote: > On 01/09/2017 07:02 AM, Aurelien Buhrig wrote: >> On 06/01/2017 17:06, Jeff Law wrote: >>> On 01/06/2017 03:20 AM, Aurelien Buhrig wrote: >> So the insn: >> (set (reg:QI 0 r0) (mem:QI (plus:SI (reg:SI 2 r2)(const_int 1)) >> >> is transform

Re: input address reload issue

2017-01-09 Thread Jeff Law
On 01/09/2017 07:02 AM, Aurelien Buhrig wrote: On 06/01/2017 17:06, Jeff Law wrote: On 01/06/2017 03:20 AM, Aurelien Buhrig wrote: So the insn: (set (reg:QI 0 r0) (mem:QI (plus:SI (reg:SI 2 r2)(const_int 1)) is transformed into: (set (reg:SI 8 a0) (reg:SI 2 r2)) (set (reg:SI 8 a0) (const_int

Re: input address reload issue

2017-01-09 Thread Aurelien Buhrig
On 06/01/2017 17:06, Jeff Law wrote: > On 01/06/2017 03:20 AM, Aurelien Buhrig wrote: >> So the insn: (set (reg:QI 0 r0) (mem:QI (plus:SI (reg:SI 2 r2)(const_int 1)) is transformed into: (set (reg:SI 8 a0) (reg:SI 2 r2)) (set (reg:SI 8 a0) (const_int 1)) (set (reg

Re: input address reload issue

2017-01-06 Thread Jeff Law
On 01/06/2017 09:37 AM, Eric Botcazou wrote: I would suggesting moving away from cc0 first. cc0 is an abomination and should have been abolished years ago -- the only reason is many old ports would break and nobody's taken the time to convert them or propose them for deprecation. It's 8 out of

Re: input address reload issue

2017-01-06 Thread Eric Botcazou
> I would suggesting moving away from cc0 first. cc0 is an abomination > and should have been abolished years ago -- the only reason is many old > ports would break and nobody's taken the time to convert them or propose > them for deprecation. It's 8 out of 47 ports, most of them old indeed, with

Re: input address reload issue

2017-01-06 Thread Jeff Law
On 01/06/2017 03:26 AM, Aurelien Buhrig wrote: Look at the dump file for reload to see where things come from. Also everything Jeff said; you really want LRA. I will try switching to LRA in a second step, but I think I need first to remove the old cc0... BTW, in which way the LRA is better

Re: input address reload issue

2017-01-06 Thread Jeff Law
On 01/06/2017 03:20 AM, Aurelien Buhrig wrote: So the insn: (set (reg:QI 0 r0) (mem:QI (plus:SI (reg:SI 2 r2)(const_int 1)) is transformed into: (set (reg:SI 8 a0) (reg:SI 2 r2)) (set (reg:SI 8 a0) (const_int 1)) (set (reg:SI 8 a0) (plus:SI (reg:SI 8 a0) (reg:SI 8 a0))) (set (reg:QI 0 r0) (mem

Re: input address reload issue

2017-01-06 Thread Segher Boessenkool
On Fri, Jan 06, 2017 at 11:26:40AM +0100, Aurelien Buhrig wrote: > > Look at the dump file for reload to see where things come from. Also > > everything Jeff said; you really want LRA. > > I will try switching to LRA in a second step, but I think I need first to > remove the old cc0... :-) > B

Re: input address reload issue

2017-01-06 Thread Aurelien Buhrig
> Look at the dump file for reload to see where things come from. Also > everything Jeff said; you really want LRA. I will try switching to LRA in a second step, but I think I need first to remove the old cc0... BTW, in which way the LRA is better than IRA? Is there any benchmarks? Thanks for

Re: input address reload issue

2017-01-06 Thread Aurelien Buhrig
>> So the insn: >> (set (reg:QI 0 r0) (mem:QI (plus:SI (reg:SI 2 r2)(const_int 1)) >> >> is transformed into: >> (set (reg:SI 8 a0) (reg:SI 2 r2)) >> (set (reg:SI 8 a0) (const_int 1)) >> (set (reg:SI 8 a0) (plus:SI (reg:SI 8 a0) (reg:SI 8 a0))) >> (set (reg:QI 0 r0) (mem:QI (reg:SI 8 a0)) >> >> Th

Re: input address reload issue

2017-01-06 Thread Segher Boessenkool
On Thu, Jan 05, 2017 at 05:18:46PM +0100, Aurelien Buhrig wrote: > The issue happens when reloading: > > (set (reg:QI 47 [ _9 ]) > (mem:QI (plus:SI (reg/v/f:SI 68 [orig:51 in ] [51]) > (const_int 1 [0x1]) > > My understanding is that IRA allocates hardregs to allocno which are >

Re: input address reload issue

2017-01-05 Thread Jeff Law
On 01/05/2017 09:18 AM, Aurelien Buhrig wrote: Hi all, and best wishes for the happy new year! I'm porting a private 4.6 backend to GCC 6 and facing a reload issue and I would appreciate a little help to cope with it. The issue happens when reloading: (set (reg:QI 47 [ _9 ]) (mem:QI (plus:SI