Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-12-01 Thread Segher Boessenkool
On Thu, Dec 01, 2016 at 12:24:37PM +0100, Paolo Bonzini wrote: > > > On 30/11/2016 13:46, Segher Boessenkool wrote: > >if (JUMP_P (use_insn)) > > continue; > > > > + /* Also don't substitute into a conditional trap insn -- it can > > become > > +an unconditional trap, and

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-12-01 Thread Paolo Bonzini
On 30/11/2016 13:46, Segher Boessenkool wrote: >if (JUMP_P (use_insn)) > continue; > > + /* Also don't substitute into a conditional trap insn -- it can become > + an unconditional trap, and that is a flow control insn. */ > + if (GET_CODE (PATTERN (use_insn)) == T

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-11-30 Thread Segher Boessenkool
On Wed, Nov 30, 2016 at 05:54:58AM -0700, Jeff Law wrote: > Funny how you speculated there could be these issues hiding in the > weeds, then just a few days later, one crawls out. Two (there is PR78607 as well). Although that one seems related to the combine one. All the same reporter, it's not

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-11-30 Thread Segher Boessenkool
On Wed, Nov 30, 2016 at 01:52:51PM +0100, Richard Biener wrote: > On Wed, Nov 30, 2016 at 1:46 PM, Segher Boessenkool > wrote: > > In the testcase, IRA propagates a constant into a TRAP_IF insn, which > > then becomes an unconditional trap. Unconditional traps are control > > flow insns so doing

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-11-30 Thread Richard Biener
On Wed, Nov 30, 2016 at 1:57 PM, Jeff Law wrote: > On 11/30/2016 05:52 AM, Richard Biener wrote: >> >> On Wed, Nov 30, 2016 at 1:46 PM, Segher Boessenkool >> wrote: >>> >>> In the testcase, IRA propagates a constant into a TRAP_IF insn, which >>> then becomes an unconditional trap. Unconditional

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-11-30 Thread Jeff Law
On 11/30/2016 05:52 AM, Richard Biener wrote: On Wed, Nov 30, 2016 at 1:46 PM, Segher Boessenkool wrote: In the testcase, IRA propagates a constant into a TRAP_IF insn, which then becomes an unconditional trap. Unconditional traps are control flow insns so doing this requires surgery on the cf

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-11-30 Thread Jeff Law
On 11/30/2016 05:46 AM, Segher Boessenkool wrote: In the testcase, IRA propagates a constant into a TRAP_IF insn, which then becomes an unconditional trap. Unconditional traps are control flow insns so doing this requires surgery on the cfg. We cannot do that here, so instead refuse to do the s

Re: [PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-11-30 Thread Richard Biener
On Wed, Nov 30, 2016 at 1:46 PM, Segher Boessenkool wrote: > In the testcase, IRA propagates a constant into a TRAP_IF insn, which > then becomes an unconditional trap. Unconditional traps are control > flow insns so doing this requires surgery on the cfg. Huh, that's an odd choice ;) I'd say T

[PATCH] ira: Don't substitute into TRAP_IF insns (PR78610)

2016-11-30 Thread Segher Boessenkool
In the testcase, IRA propagates a constant into a TRAP_IF insn, which then becomes an unconditional trap. Unconditional traps are control flow insns so doing this requires surgery on the cfg. We cannot do that here, so instead refuse to do the substitution. Bootstrapping + regression testing on