From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5549 invoked by alias); 11 Feb 2015 06:04:07 -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 5527 invoked by uid 89); 11 Feb 2015 06:04:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 11 Feb 2015 06:04:05 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1B63wGX019728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Feb 2015 01:03:58 -0500 Received: from [10.3.113.80] (ovpn-113-80.phx2.redhat.com [10.3.113.80]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1B63viH026920; Wed, 11 Feb 2015 01:03:57 -0500 Message-ID: <54DAF0CD.9030701@redhat.com> Date: Wed, 11 Feb 2015 06:04:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "Thomas Preud'homme" , "'Andrew Pinski'" CC: Eric Botcazou , GCC Patches Subject: Re: [PATCH 1/2, combine] Try REG_EQUAL for nonzero_bits References: <00f001d044d4$23f37e20$6bda7a60$@arm.com> <00f201d044d8$0131ccd0$03956670$@arm.com> In-Reply-To: <00f201d044d8$0131ccd0$03956670$@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00673.txt.bz2 On 02/09/15 19:19, Thomas Preud'homme wrote: >> From: Andrew Pinski [mailto:pinskia@gmail.com] >> Sent: Tuesday, February 10, 2015 9:57 AM > >>> +#ifdef SHORT_IMMEDIATES_SIGN_EXTEND >>> +/* If MODE has a precision lower than PREC and SRC is a non-negative >> constant >>> + that would appear negative in MODE, sign-extend SRC for use in >> nonzero_bits >>> + because some machines (maybe most) will actually do the sign- >> extension and >>> + this is the conservative approach. >>> + >>> + ??? For 2.5, try to tighten up the MD files in this regard instead of >> this >>> + kludge. */ >> >> I don't know if this has been mentioned and even though you are just >> copying a comment from below but would it make sense to look fixing >> what the comment says we should look at after GCC 2.5 (which was over >> 20 years ago)? Or maybe just remove the comment if it no longer >> applies. > > Actually this bit seems unnecessary as there is already some logic in > nonzero_bits1 for the CONST_INT case. So I guess the code can be > removed and the comment be moved there at the very least but > I'd prefer people from one of the affected target to test it. > > Looking for backend that define SHORT_IMMEDIATES_SIGN_EXTEND, that > would be someone interested in alpha, frv, lm32, m32r, mep, mips, rs6000, > rx, sh, tilegx or tilepro. FWIW, I went back into the old gcc development archives for 1993 and couldn't find any reference/justification for this patch. So no help in understanding the precise issue from the old archives. Given the rs6000 is affected, one could do before/after tests natively in the gcc farm to ensure that removing that code doesn't change the generated code across a bootstrap. That's probably how I'd approach gathering some data about whether or not the comment/code is still appropriate/needed. jeff