From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19661 invoked by alias); 7 May 2002 03:34:44 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19642 invoked by uid 61); 7 May 2002 03:34:43 -0000 Date: Mon, 06 May 2002 20:34:00 -0000 Message-ID: <20020507033443.19641.qmail@sources.redhat.com> To: 95318-quiet@bugs.debian.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: sayle@gcc.gnu.org Reply-To: sayle@gcc.gnu.org, 95318-quiet@bugs.debian.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: optimization/2962: unnecessary instruction cwtl X-SW-Source: 2002-05/txt/msg00174.txt.bz2 List-Id: Synopsis: unnecessary instruction cwtl State-Changed-From-To: analyzed->closed State-Changed-By: sayle State-Changed-When: Mon May 6 20:34:42 2002 State-Changed-Why: This has been fixed on mainline by the recent patch 2002-04-17 Roger Sayle Jakub Jelinek * fold-const.c (fold) [NOP_EXPR]: Convert (T)(x&c) into ((T)x&(T)c) for integer constant c (if x has unsigned type or sign bit is not set in c). This folds the zero/sign extension into the bit-wise and operation. We now no longer generate the unnecessary "cwtl" instruction for the test case in the PR. [Unfortunately with -Os, there is no net space saving for this example function as mainline also decides to use a longer but faster load instruction]. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2962