Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-20 Thread Richard Henderson
On 04/19/2011 02:52 AM, Denis Chertykov wrote: > 2011/4/19 Georg-Johann Lay : >> How can add, sub etc. be split? This would need an explicit >> representation of carry. > > Yes. > > Look at http://gcc.gnu.org/ml/gcc/2005-03/msg00871.html Well, sort-of, but not really. It gets a tad ugly, but ha

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-20 Thread Denis Chertykov
2011/4/20 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/4/17 Denis Chertykov : >>> 2011/4/15 Georg-Johann Lay : Finally, I exposed alternative #3 of the insns to the register allocator, because it is not possible to distinguish between overlapping or non-overlapping regs, and

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-20 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/17 Denis Chertykov : >> 2011/4/15 Georg-Johann Lay : >>> Finally, I exposed alternative #3 of the insns to the register >>> allocator, because it is not possible to distinguish between >>> overlapping or non-overlapping regs, and #3 does not need a scratch. >>> >>>

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-19 Thread Richard Earnshaw
On Tue, 2011-04-19 at 15:17 +0400, Denis Chertykov wrote: > 2011/4/19 Georg-Johann Lay : > > Denis Chertykov schrieb: > >> 2011/4/19 Georg-Johann Lay : > >>> How can add, sub etc. be split? This would need an explicit > >>> representation of carry. > >> > >> Yes. > >> > >> Look at http://gcc.gnu.o

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-19 Thread Denis Chertykov
2011/4/19 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/4/19 Georg-Johann Lay : >>> How can add, sub etc. be split? This would need an explicit >>> representation of carry. >> >> Yes. >> >> Look at http://gcc.gnu.org/ml/gcc/2005-03/msg00871.html > > Just skimmed the conversation. I thought

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-19 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/19 Georg-Johann Lay : >> How can add, sub etc. be split? This would need an explicit >> representation of carry. > > Yes. > > Look at http://gcc.gnu.org/ml/gcc/2005-03/msg00871.html Just skimmed the conversation. I thought about making AVR ISA's effects on SREG

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-19 Thread Denis Chertykov
2011/4/19 Georg-Johann Lay : > How can add, sub etc. be split? This would need an explicit > representation of carry. Yes. Look at http://gcc.gnu.org/ml/gcc/2005-03/msg00871.html Denis.

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-19 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/18 Georg-Johann Lay : >> Denis Chertykov schrieb: >>> 2011/4/17 Denis Chertykov : 2011/4/15 Georg-Johann Lay : > Finally, I exposed alternative #3 of the insns to the register > allocator, because it is not possible to distinguish between > overlap

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-18 Thread Denis Chertykov
2011/4/18 Denis Chertykov : > 2011/4/18 Georg-Johann Lay : > Few years ago I have played with early splitting of anything possible > (move,add,sub,and,...). The results was very bad. > It's happened because flow of splitted insns (8bits insns) becomes > unreadable for most of GCC optimisation passe

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-18 Thread Denis Chertykov
2011/4/18 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/4/17 Denis Chertykov : >>> 2011/4/15 Georg-Johann Lay : Finally, I exposed alternative #3 of the insns to the register allocator, because it is not possible to distinguish between overlapping or non-overlapping regs, and

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-18 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/17 Denis Chertykov : >> 2011/4/15 Georg-Johann Lay : >>> Finally, I exposed alternative #3 of the insns to the register >>> allocator, because it is not possible to distinguish between >>> overlapping or non-overlapping regs, and #3 does not need a scratch. >>> >>>

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-17 Thread Denis Chertykov
2011/4/17 Denis Chertykov : > 2011/4/15 Georg-Johann Lay : >> Finally, I exposed alternative #3 of the insns to the register >> allocator, because it is not possible to distinguish between >> overlapping or non-overlapping regs, and #3 does not need a scratch. >> >> Ran C-testsuite with no regressi

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-17 Thread Denis Chertykov
2011/4/15 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/4/14 Georg-Johann Lay : >>> Denis Chertykov schrieb: 2011/4/14 Georg-Johann Lay : > The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by > using 4 operands instead of 3. This runs in ICE in top of > optabs.

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-15 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/14 Georg-Johann Lay : >> Denis Chertykov schrieb: >>> 2011/4/14 Georg-Johann Lay : The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by using 4 operands instead of 3. This runs in ICE in top of optabs.c:maybe_gen_insn. The right

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Denis Chertykov
2011/4/14 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/4/14 Georg-Johann Lay : >>> The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by >>> using 4 operands instead of 3. This runs in ICE in top of >>> optabs.c:maybe_gen_insn. >>> >>> The right way to do this is to use match_du

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/14 Georg-Johann Lay : >> The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by >> using 4 operands instead of 3. This runs in ICE in top of >> optabs.c:maybe_gen_insn. >> >> The right way to do this is to use match_dup, not match_operand. So >> the fix i

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Denis Chertykov
2011/4/14 Georg-Johann Lay : > The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by > using 4 operands instead of 3. This runs in ICE in top of > optabs.c:maybe_gen_insn. > > The right way to do this is to use match_dup, not match_operand. So > the fix is obvious. > > Regenerated avr-gc

[Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-14 Thread Georg-Johann Lay
The "rotl3" expanders (mode \in {HI,SI,DI}) violates synopsis by using 4 operands instead of 3. This runs in ICE in top of optabs.c:maybe_gen_insn. The right way to do this is to use match_dup, not match_operand. So the fix is obvious. Regenerated avr-gcc and run against avr testsuite: gcc.targe