Re: Reload with jump_insn that have a 'set' side effect.

2013-09-18 Thread Hendrik Greving
Yes thanks it worked out exactly like you said. I first made the mistake to constrain the match_scratch 'rX' and then wondering why I am still seeing a scratch after reload. I realized you were talking about a real alternative 'r,X'. Regards, Hendrik Greving On Wed, Sep 18, 2013 at 12:26 AM, Ric

Re: Reload with jump_insn that have a 'set' side effect.

2013-09-18 Thread Richard Sandiford
Hendrik Greving writes: > One follow-up question here. Is it of any disadvantage to always > generate a clobber (scratch) during expansion? Meaning that in the > case we don't need one (we won't split, which I am checking with > memory_operand(myoutput_operand), that register won't get allocated >

Re: Reload with jump_insn that have a 'set' side effect.

2013-09-17 Thread Hendrik Greving
One follow-up question here. Is it of any disadvantage to always generate a clobber (scratch) during expansion? Meaning that in the case we don't need one (we won't split, which I am checking with memory_operand(myoutput_operand), that register won't get allocated and adds to register pressure, doe

Re: Reload with jump_insn that have a 'set' side effect.

2013-09-17 Thread Richard Sandiford
Hendrik Greving writes: > For a special mechanism we are generating jump_insn with a 'set' side > effect in our backend. RTL looks e.g. like this: > > (jump_insn 25 24 26 (nil) (parallel [ > (set (pc) > (if_then_else (ne (unspec_volatile [ >

Re: Reload with jump_insn that have a 'set' side effect.

2013-09-17 Thread Hendrik Greving
Richard, this sounds very good. Let me try this. So far, what I meant by 'reloading myself' was that when generating the RTL above, I actually emit move instructions to/from memory if the arguments are memory, and generate RTL above only with hard registers. I did not mention that RTL expansion is

Reload with jump_insn that have a 'set' side effect.

2013-09-17 Thread Hendrik Greving
Hi, For a special mechanism we are generating jump_insn with a 'set' side effect in our backend. RTL looks e.g. like this: (jump_insn 25 24 26 (nil) (parallel [ (set (pc) (if_then_else (ne (unspec_volatile [ (const_string (" %0,[%1] =%2"