From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4619 invoked by alias); 25 Apr 2011 17:11:09 -0000 Received: (qmail 4607 invoked by uid 22791); 25 Apr 2011 17:11:08 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Apr 2011 17:10:54 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3PHAjCA017898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Apr 2011 13:10:45 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3PHAiYT002916; Mon, 25 Apr 2011 13:10:44 -0400 Received: from [10.3.113.96] (ovpn-113-96.phx2.redhat.com [10.3.113.96]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p3PHAhqa018479; Mon, 25 Apr 2011 13:10:43 -0400 Message-ID: <4DB5AB13.1000407@redhat.com> Date: Mon, 25 Apr 2011 18:08:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: Chung-Lin Tang CC: gcc-patches Subject: Re: [PATCH] Canonicalize compares in combine [1/3] Abstract out parts of simplify_comparison() References: <4DB19CF4.2010108@codesourcery.com> In-Reply-To: <4DB19CF4.2010108@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 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/msg01980.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/22/11 09:21, Chung-Lin Tang wrote: > This patch abstracts out a small part of simplify_comparison(), into a > new function simplify_compare_const(). The parts are basically where the > comparison RTX code and a constant operand (op1) can be simplified > towards "compare with zero". Note this part leaves op0 untouched, thus > not passed into simplify_compare_const() by reference. > > By itself this patch should only be a code reorganization, and changes > nothing to the compiler. > > This is part of a small improvement to the compare combining code in the > later patch. During before, the entire case required operand[1] of i3 to > be const0_rtx, now we can try a little tweaking of the code and > constant, and see if it then changes to a cmp zero. > > This abstracted patch was bootstrapped and tested independently on i686, > to be sure it was only a reorg. A reasonable cleanup. I would suggest a minor addition the comment before simplify_compare_const. Specifically, the comment should say something about the return value, including modification of *pop1. Consider the patch pre-approved with the comment addition. Thanks, Jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNtasTAAoJEBRtltQi2kC731QH+wbWlHiws5F1kM631+LYeq9k O+1yW926RijnIF7uMPXU/qvzXS7ipAXjoqp54LJUv2aU453nh2Pyq45CulAZWnVF iUZmb8PHk1GP9yDwHnOh15WHHDQmVzxLyOxodG9JmGR+oRskGmTQhdj0oNh3OMG7 7TsnXLSQqLpZg2XYxp7u8QOKSeG3X4gXwMFJdwii/ihuES4l8M4QemnpCXYDe+Tl ZNyAWmeCW1833pk41vFEorWA3jFogminJy3gijJkxKsGjJME0eVtXSpCeGQfA4cg ifJMyQmVI58h/f95lmNqzXxwVWQPkkKfOvfcC2QmM8PwXHjD4JziostNtKsmbqg= =E/b1 -----END PGP SIGNATURE-----