From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18265 invoked by alias); 14 Apr 2011 17:20:29 -0000 Received: (qmail 18241 invoked by uid 22791); 14 Apr 2011 17:20:28 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,TW_OV X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Apr 2011 17:20:24 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by post.strato.de (fruni mo29) (RZmta 25.14) with ESMTPA id u064b2n3EG3dfN ; Thu, 14 Apr 2011 19:20:06 +0200 (MEST) Message-ID: <4DA72CC6.5030001@gjlay.de> Date: Thu, 14 Apr 2011 17:20:00 -0000 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: Denis Chertykov CC: gcc-patches@gcc.gnu.org, Anatoly Sokolov , Eric Weddington Subject: Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander. References: <4DA6CB8E.1040707@gjlay.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01106.txt.bz2 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 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 >> >> * 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' and `*rotb'. These are splitters that might split before reload, producing strange, non-matching insns like (set (scratch:QI) ... or crashing already in avr_rotate_bytes becase the split condition reads "&& (reload_completed || mode == DImode)" By the way: this and other patterns implement DImode insns, but there is *no* movdi in avr backend. That is strongly discouraged, i.e. implementing insns for FOOmode if there in no movfoo insn that can do reloading for that mode. It's tempting to omit movdi (because movdi would be the most complicated DI insn) but it's unhealthy. IMO the DI stuff should be removed / deactivated as long as there is no proper support of DImode. > > Denis. >