Re: [Patch,AVR]: Fix PR50447 (4/n)

2011-10-11 Thread Denis Chertykov
2011/10/11 Georg-Johann Lay : > This is a small addendum to PR50447. > > It's a change to addsi3 insn; the actual insn sequence printed is still the > same (except for adding +/-1 to l-reg) but the effect on cc0 is worked out so > that it can be used to cancel out comparisons like in long loops. >

Re: [Patch,AVR]: Fix PR50447 (2/n)

2011-09-27 Thread Richard Henderson
On 09/23/2011 02:10 AM, Paolo Bonzini wrote: > On 09/23/2011 10:56 AM, Paolo Bonzini wrote: >> Also, I am curious about one thing: while this is of course a very >> pragmatic solution, you could also convert AVR to get rid of CC0, do >> this at expansion time, and get split-wide-types to work as in

Re: [Patch,AVR]: Fix PR50447 (3/n)

2011-09-23 Thread Denis Chertykov
2011/9/23 Georg-Johann Lay : > This is the compare part to fix PR50447. > > Just like the preceding changes to fix PR50447 it's a micro-optimization to > smarter print-out of instructions. > > The patch covers comparisons against HI and SI integers. > > The byte-wide comparison allows reusing the v

Re: [Patch,AVR]: Fix PR50447 (2/n)

2011-09-23 Thread Paolo Bonzini
On 09/23/2011 11:36 AM, Georg-Johann Lay wrote: Paolo Bonzini schrieb: On 09/23/2011 10:56 AM, Paolo Bonzini wrote: Also, I am curious about one thing: while this is of course a very pragmatic solution, you could also convert AVR to get rid of CC0, do this at expansion time, and get split-wide-

Re: [Patch,AVR]: Fix PR50447 (2/n)

2011-09-23 Thread Georg-Johann Lay
Paolo Bonzini schrieb: > On 09/23/2011 10:56 AM, Paolo Bonzini wrote: >> Also, I am curious about one thing: while this is of course a very >> pragmatic solution, you could also convert AVR to get rid of CC0, do >> this at expansion time, and get split-wide-types to work as intended. My changes ar

Re: [Patch,AVR]: Fix PR50447 (2/n)

2011-09-23 Thread Paolo Bonzini
On 09/23/2011 10:56 AM, Paolo Bonzini wrote: Also, I am curious about one thing: while this is of course a very pragmatic solution, you could also convert AVR to get rid of CC0, do this at expansion time, and get split-wide-types to work as intended. compare-elim.c makes it relatively easy to re

Re: [Patch,AVR]: Fix PR50447 (2/n)

2011-09-23 Thread Paolo Bonzini
On 09/23/2011 10:41 AM, Georg-Johann Lay wrote: Yes, can be done for comparisons, too. I'd prefer a separate patch for it. The subject is bit misleading; should be (2/n). Also, I am curious about one thing: while this is of course a very pragmatic solution, you could also convert AVR to get r

Re: [Patch,AVR]: Fix PR50447 (2/n)

2011-09-23 Thread Georg-Johann Lay
Paolo Bonzini schrieb: > On 09/22/2011 07:43 PM, Georg-Johann Lay wrote: >> This patch adds the PLUS part to fix the PR. >> >> addsi3 has a 8-bit scratch register now so that constants that are not >> covered >> by the constraints won't force a reload of the constant. >> >> The output routine tries

Re: [Patch,AVR]: Fix PR50447

2011-09-23 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/9/22 Georg-Johann Lay : >> This patch adds the PLUS part to fix the PR. >> >> addsi3 has a 8-bit scratch register now so that constants that are not >> covered >> by the constraints won't force a reload of the constant. >> >> The output routine tries adding the cons

Re: [Patch,AVR]: Fix PR50447

2011-09-23 Thread Paolo Bonzini
On 09/22/2011 07:43 PM, Georg-Johann Lay wrote: This patch adds the PLUS part to fix the PR. addsi3 has a 8-bit scratch register now so that constants that are not covered by the constraints won't force a reload of the constant. The output routine tries adding the constant and subtracting the n

Re: [Patch,AVR]: Fix PR50447

2011-09-22 Thread Denis Chertykov
2011/9/22 Georg-Johann Lay : > This patch adds the PLUS part to fix the PR. > > addsi3 has a 8-bit scratch register now so that constants that are not covered > by the constraints won't force a reload of the constant. > > The output routine tries adding the constant and subtracting the negated > co

Re: [Patch,AVR]: Fix PR50447 (1/n)

2011-09-22 Thread Denis Chertykov
2011/9/21 Georg-Johann Lay : > This patch improves IOR, XOR, AND for HI and SI. > > There is room for improvement in the current implementation: > > - better analysis if a scratch is actually needed > - add clobber operands to some insns > - use 8-bit scratch instead of reload the constant > - reus