Re: [PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-12 Thread Andrew MacLeod
On 04/12/2016 09:06 AM, Jakub Jelinek wrote: On Tue, Apr 12, 2016 at 09:01:58AM -0400, Andrew MacLeod wrote: I poked around for a while and found a patch from late 2012 where I was attempting to implement atomics as a gimple primitive (GIMPLE_ATOMIC). That work did indeed add the ability of

Re: [PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-12 Thread Jakub Jelinek
On Tue, Apr 12, 2016 at 09:01:58AM -0400, Andrew MacLeod wrote: > I poked around for a while and found a patch from late 2012 where I was > attempting to implement atomics as a gimple primitive (GIMPLE_ATOMIC). That > work did indeed add the ability of the CAS primitive to return 2 values to >

Re: [PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-12 Thread Andrew MacLeod
On 04/12/2016 04:35 AM, Richard Biener wrote: On Mon, 11 Apr 2016, Jeff Law wrote: On 04/08/2016 10:10 AM, Jakub Jelinek wrote: On Fri, Apr 08, 2016 at 06:04:38PM +0200, Richard Biener wrote: Hmm, don't we simply want to do this for all stmts (OK, only asm have multiple defs...)? For all

Re: [PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-12 Thread Richard Biener
On Mon, 11 Apr 2016, Jeff Law wrote: > On 04/08/2016 10:10 AM, Jakub Jelinek wrote: > > On Fri, Apr 08, 2016 at 06:04:38PM +0200, Richard Biener wrote: > > > Hmm, don't we simply want to do this for all stmts (OK, only asm have > > > multiple defs...)? > > > > For all stmts that have multiple

Re: [PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-11 Thread Jeff Law
On 04/08/2016 10:10 AM, Jakub Jelinek wrote: On Fri, Apr 08, 2016 at 06:04:38PM +0200, Richard Biener wrote: Hmm, don't we simply want to do this for all stmts (OK, only asm have multiple defs...)? For all stmts that have multiple defs (which is only GIMPLE_ASM right now). I thought the

Re: [PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-08 Thread Richard Biener
On April 8, 2016 6:10:05 PM GMT+02:00, Jakub Jelinek wrote: >On Fri, Apr 08, 2016 at 06:04:38PM +0200, Richard Biener wrote: >> Hmm, don't we simply want to do this for all stmts (OK, only asm have >multiple defs...)? > >For all stmts that have multiple defs (which is only

Re: [PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-08 Thread Jakub Jelinek
On Fri, Apr 08, 2016 at 06:04:38PM +0200, Richard Biener wrote: > Hmm, don't we simply want to do this for all stmts (OK, only asm have > multiple defs...)? For all stmts that have multiple defs (which is only GIMPLE_ASM right now). Though, of course, if you want, unconditionally doing:

Re: [PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-08 Thread Richard Biener
On April 8, 2016 4:54:22 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >xen is miscompiled since Alex' SSA coalescing changes. >The problem is that we have there inline asm that sets more than one >SSA_NAME, one of them is dead though (has zero uses) and because of >the zero uses

[PATCH] Fix ssa coalescing with inline asm (PR middle-end/70593)

2016-04-08 Thread Jakub Jelinek
Hi! xen is miscompiled since Alex' SSA coalescing changes. The problem is that we have there inline asm that sets more than one SSA_NAME, one of them is dead though (has zero uses) and because of the zero uses coalescing doesn't see any conflicts and puts both the SSA_NAMEs in the two GIMPLE_ASM