From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17759 invoked by alias); 18 Feb 2015 11:59:55 -0000 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 Received: (qmail 17743 invoked by uid 89); 18 Feb 2015 11:59:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.218) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 18 Feb 2015 11:59:52 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwTPbBBR62PQx1xqvTHw== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (ip5b43a95f.dynamic.kabel-deutschland.de [91.67.169.95]) by smtp.strato.de (RZmta 37.3 DYNA|AUTH) with ESMTPSA id 500958r1IBxmzs6 (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate); Wed, 18 Feb 2015 12:59:48 +0100 (CET) Message-ID: <54E47EB3.1@gjlay.de> Date: Wed, 18 Feb 2015 11:59:00 -0000 From: Georg-Johann Lay User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Denis Chertykov CC: GCC Patches Subject: Re: [patch, avr] Fix ICE PR64452 pushing eliminated rtxes References: <54E3223B.2070504@gjlay.de> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg01090.txt.bz2 Am 02/17/2015 um 03:34 PM schrieb Denis Chertykov: > 2015-02-17 14:12 GMT+03:00 Georg-Johann Lay : >> Byte-wise pushing virtual regs like arg pointer migth result in patterns >> like >> >> (set (mem:QI (post_dec:HI (reg:HI 32 SP))) >> (subreg:QI (plus:HI (reg:HI 28) >> (const_int 17)) 0)) >> >> after elimination. >> >> Attached patch uses new pushhi1_insn to push virtuals in HImode so that >> expressions like in subreg_reg from above can be reloaded. >> >> Ok to commit ? >> >> Johann >> >> PR target/64452 >> >> * config/avr/avr.md (pushhi_insn): New insn. >> (push1): Push virtual regs in one chunk using pushhi1_insn. > > Approved. > (But I'm worry about this because it's reload related problem and it > can have a side effect) > > Denis. So you have a superior solution in mind? What side effects specifically? Currently the side effect is that reload gets simpler expressions and hence does not ICE. There isn't even an insn that can push complex (plus rtx in this case) expressions or subregs thereof. Even if there were such insns I don't think reload is supposed to handle them. The current implementation of push1 assumes that all RTXes which ever appear in a push can be decomposed into subregs and these can be simplified to some of the push insns, i.e. the push operand simplifies to REG or CONST0_RTX. The subreg above, however, cannot be simplified to anything reload can handle and does not match an insn. And supplying such an insn is pointless because that insn would need a scratch and hence require secondary reloads... plus rtxes are special as they might be produced by reload (R28 above is (hard_)frame_pointer). For similar reason there are two addhi3 insns (one without scratch to accommodate reload and one generic with scratch for better performance.) Johann