This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Anatoly Sokolov <aesok at post dot ru>, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Thu, 14 Apr 2011 20:21:06 +0400
- Subject: Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.
- References: <4DA6CB8E.1040707@gjlay.de>
2011/4/14 Georg-Johann Lay <avr@gjlay.de>:
> The "rotl<mode>3" 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.target/avr/torture/pr41885.c generates these patterns
>
> Johann
>
> 2011-04-14 ÂGeorg-Johann Lay Â<avr@gjlay.de>
>
> Â Â Â Â* config/avr/avr.md ("rotlhi3", "rotlsi3", "rotldi3"): Fix
> Â Â Â Âexpanders operand 3 from match_operand to match_dup.
May be better to use (clobber (match_scratch ...)) here and in
`*rotw<mode>' and `*rotb<mode>'.
Denis.