From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7477 invoked by alias); 10 Apr 2007 17:53:58 -0000 Received: (qmail 7330 invoked by uid 22791); 10 Apr 2007 17:53:57 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Apr 2007 18:53:49 +0100 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id l3AHrimw016528; Tue, 10 Apr 2007 10:53:44 -0700 Received: from localhost.localdomain.google.com (dhcp-172-22-80-169.corp.google.com [172.22.80.169]) (authenticated bits=0) by zps36.corp.google.com with ESMTP id l3AHr711015395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 10 Apr 2007 10:53:07 -0700 To: "J.C. Pizarro" Cc: gcc@gcc.gnu.org Subject: Re: A microoptimization of isnegative or greaterthan2millions. References: <998d0e4a0704101029m562e8264yee69e957dca6c76d@mail.gmail.com> From: Ian Lance Taylor Date: Tue, 10 Apr 2007 17:54:00 -0000 In-Reply-To: <998d0e4a0704101029m562e8264yee69e957dca6c76d@mail.gmail.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2007-04/txt/msg00322.txt.bz2 "J.C. Pizarro" writes: > /* Given X an unsigned of 32 bits, and Y a bool. Try to translate optimizing > * > * Y = X > 2147483647; to Y = ((signed)X) < 0; > * Y = X >= 2147483648; to Y = ((signed)X) < 0; > * > * [ Another optimization is to Y = (X >> 31) ] As far as I can tell, you are recommending that gcc generate a different code sequence than it currently does. The most helpful approach you can use for such a suggestion is to open a bug report marked as an enhancement. See http://gcc.gnu.org/bugs.html. Postings to gcc@gcc.gnu.org are not wrong, but they will almost certainly get lost. An entry in the bug database will not get lost. Thanks. Ian