Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-15 Thread Bernd Schmidt
On 03/15/2016 03:27 AM, Alan Modra wrote: On Mon, Mar 14, 2016 at 01:00:39PM -0600, Jeff Law wrote: Right. Tolerant as in not crash. So can someone please approve my ira.c:indirect_jump_optimize patch? I'm not quite audacious enough to claim it is obvious. Looks good to me. Bernd

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-14 Thread Alan Modra
On Mon, Mar 14, 2016 at 01:00:39PM -0600, Jeff Law wrote: > Right. Tolerant as in not crash. So can someone please approve my ira.c:indirect_jump_optimize patch? I'm not quite audacious enough to claim it is obvious. The original is at https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00720.html,

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-14 Thread Jeff Law
On 03/14/2016 03:56 AM, Richard Biener wrote: Undefined? Most likely. But we still have to do something sensible. As Jakub noted, a user could create the problematic code just as easily as DCE/DSE, so IRA probably needs to be tolerant of this situation. So it seems like you're suggesting we

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-14 Thread Richard Biener
On Sat, Mar 12, 2016 at 6:07 PM, Jeff Law wrote: > On 03/12/2016 04:10 AM, Richard Biener wrote: >> >> On March 12, 2016 10:29:40 AM GMT+01:00, Jakub Jelinek >> wrote: >>> >>> On Sat, Mar 12, 2016 at 07:37:25PM +1030, Alan Modra wrote: > > I believe

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-12 Thread Richard Biener
On March 12, 2016 10:29:40 AM GMT+01:00, Jakub Jelinek wrote: >On Sat, Mar 12, 2016 at 07:37:25PM +1030, Alan Modra wrote: >> > I believe Alan's point is DSE deleted the assignment to x which >can't be >> > right as long as we've left in goto * >> > >> > The goto * should be a

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-12 Thread Jakub Jelinek
On Sat, Mar 12, 2016 at 07:37:25PM +1030, Alan Modra wrote: > > I believe Alan's point is DSE deleted the assignment to x which can't be > > right as long as we've left in goto * > > > > The goto * should be a use of x and thus should have kept the assignment > > live. > > Right, I wasn't trying

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-12 Thread Alan Modra
On Sat, Mar 12, 2016 at 01:26:39AM -0700, Jeff Law wrote: > On 03/12/2016 12:58 AM, Jakub Jelinek wrote: > >On Sat, Mar 12, 2016 at 09:43:50AM +1030, Alan Modra wrote: > >>The underlying problem happens somewhere in tree-ssa-dse.c. So we get > >>an indirect jump to a random location instead of a

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-12 Thread Jeff Law
On 03/12/2016 12:58 AM, Jakub Jelinek wrote: On Sat, Mar 12, 2016 at 09:43:50AM +1030, Alan Modra wrote: The underlying problem happens somewhere in tree-ssa-dse.c. So we get an indirect jump to a random location instead of a jump to 0. Well, the testcase is there just to make sure we don't

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-11 Thread Jakub Jelinek
On Sat, Mar 12, 2016 at 09:43:50AM +1030, Alan Modra wrote: > The underlying problem happens somewhere in tree-ssa-dse.c. So we get > an indirect jump to a random location instead of a jump to 0. Well, the testcase is there just to make sure we don't ICE on it. And, changing just DSE can't be a

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-11 Thread Alan Modra
The underlying problem happens somewhere in tree-ssa-dse.c. So we get an indirect jump to a random location instead of a jump to 0. pr58164.c.035t.mergephi1 ;; Function foo (foo, funcdef_no=0, decl_uid=1389, cgraph_uid=0, symbol_order=0) foo () { int x; : x = 0; goto }

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-11 Thread Alan Modra
On Fri, Mar 11, 2016 at 09:39:58PM +0100, Andreas Schwab wrote: > I'm getting this crash on ia64 for gcc.c-torture/compile/pr58164.c: > > Program received signal SIGSEGV, Segmentation fault. > 0x412286e0 in indirect_jump_optimize () at ../../gcc/ira.c:3865 > 3865 rtx_insn

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-11 Thread Andreas Schwab
I'm getting this crash on ia64 for gcc.c-torture/compile/pr58164.c: Program received signal SIGSEGV, Segmentation fault. 0x412286e0 in indirect_jump_optimize () at ../../gcc/ira.c:3865 3865 rtx_insn *def_insn = DF_REF_INSN (DF_REG_DEF_CHAIN (regno)); (gdb) bt #0

Re: [PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-10 Thread Bernd Schmidt
On 03/10/2016 10:18 AM, Alan Modra wrote: Doing the indirect jump optimization turned out to be quite easy. Bootstrapped and regression tested powerpc64le-linux, gcc-6, gcc-5 and gcc-4.9. Bootstrap and regression test x86_64-linux still running. OK to apply? So much nicer. Ok, and thanks.

[PATCH] PR69195, Reload confused by invalid reg equivs

2016-03-10 Thread Alan Modra
Doing the indirect jump optimization turned out to be quite easy. Bootstrapped and regression tested powerpc64le-linux, gcc-6, gcc-5 and gcc-4.9. Bootstrap and regression test x86_64-linux still running. OK to apply? gcc/ PR rtl-optimization/69195 PR rtl-optimization/47992