From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21734 invoked by alias); 4 Nov 2011 08:51:34 -0000 Received: (qmail 21725 invoked by uid 22791); 4 Nov 2011 08:51:33 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Nov 2011 08:51:20 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 243A3CB0215; Fri, 4 Nov 2011 09:51:19 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3HSrFr09NbfX; Fri, 4 Nov 2011 09:51:09 +0100 (CET) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id DA98DCB0311; Fri, 4 Nov 2011 09:51:08 +0100 (CET) From: Eric Botcazou To: Paolo Bonzini Subject: Re: [Patch]: Fix PR rtl-optimization/50448 Date: Fri, 04 Nov 2011 09:23:00 -0000 User-Agent: KMail/1.9.9 Cc: "Georg-Johann Lay" , gcc-patches@gcc.gnu.org, Paolo Bonzini References: <4EB275D8.5070209@gjlay.de> <201111032221.50729.ebotcazou@adacore.com> <4EB3990A.2040803@gnu.org> In-Reply-To: <4EB3990A.2040803@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201111040950.03256.ebotcazou@adacore.com> 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-11/txt/msg00504.txt.bz2 > Yes, the changelog is wrong indeed. Registers in a SET_DEST memory are > uses, so they are like SET_SRC in this context which is why I think the > patch does belong in try_replace_reg. Georg, what do you think of a > changelog like this: > > Also try to replace uses of FROM that appear in SET_DEST. OK, this makes sense. validate_replace_src_group actually does this too. > I agree; like above, the patch should also change the head comment like > this: > > /* Try to replace all uses of FROM in INSN with TO. Returns > nonzero is successful. */ No 's' in "Returns". Note that the comment is also off: + /* If above failed and this is a single set, try to simplify the source of + the set given our substitution. We could perhaps try this for multiple + SETs, but it probably won't buy us anything. */ + rtx addr = simplify_replace_rtx (SET_DEST (set), from, to); What does "If above failed" refer to? Again "source" instead of "destination". -- Eric Botcazou