Re: [Patch, MIPS] Patch to fix MIPS optimization bug in combine

2015-10-23 Thread Eric Botcazou
> Here is the new patch that I am currently testing with your change and > incorporating Eric's comment. I included both test cases but renamed > yours and put it into gcc.dg/torture. Does the code in combine.c to > address Eric's comment look OK to you? > > Steve Ellcey > steve.ell...@imgtec.co

Re: [Patch, MIPS] Patch to fix MIPS optimization bug in combine

2015-10-21 Thread Steve Ellcey
Andrew, Here is the new patch that I am currently testing with your change and incorporating Eric's comment. I included both test cases but renamed yours and put it into gcc.dg/torture. Does the code in combine.c to address Eric's comment look OK to you? Steve Ellcey steve.ell...@imgtec.com 2

Re: [Patch, MIPS] Patch to fix MIPS optimization bug in combine

2015-10-21 Thread Segher Boessenkool
Hi, On Wed, Oct 21, 2015 at 09:44:25AM -0700, Steve Ellcey wrote: > (jump_insn 16 15 17 2 (set (pc) > (if_then_else (ne (subreg:SI (reg:DI 207) 4) > (subreg:SI (reg:DI 196 [ *last_3(D)+-4 ]) 4)) > (label_ref:DI 35) > (pc))) x.c:21 472 {*branch_equal

Re: [Patch, MIPS] Patch to fix MIPS optimization bug in combine

2015-10-21 Thread Andrew Pinski
On Thu, Oct 22, 2015 at 3:32 AM, wrote: > > >> On Oct 22, 2015, at 12:44 AM, Steve Ellcey wrote: >> >> >> A bug was reported against the GCC MIPS64 compiler that involves a bad >> combine >> and this patch fixes the bug. >> >> When using '-fexpensive-optimizations -march=mips64r2 -mabi=64' GCC

Re: [Patch, MIPS] Patch to fix MIPS optimization bug in combine

2015-10-21 Thread Andrew Pinski
On Thu, Oct 22, 2015 at 3:47 AM, Segher Boessenkool wrote: > Hi, > > On Wed, Oct 21, 2015 at 09:44:25AM -0700, Steve Ellcey wrote: >> (jump_insn 16 15 17 2 (set (pc) >> (if_then_else (ne (subreg:SI (reg:DI 207) 4) >> (subreg:SI (reg:DI 196 [ *last_3(D)+-4 ]) 4)) >>

Re: [Patch, MIPS] Patch to fix MIPS optimization bug in combine

2015-10-21 Thread pinskia
> On Oct 22, 2015, at 12:44 AM, Steve Ellcey wrote: > > > A bug was reported against the GCC MIPS64 compiler that involves a bad combine > and this patch fixes the bug. > > When using '-fexpensive-optimizations -march=mips64r2 -mabi=64' GCC is > combining these instructions: > > (insn 13 12