From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17587 invoked by alias); 9 Apr 2003 23:16:00 -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 17561 invoked by uid 71); 9 Apr 2003 23:16:00 -0000 Date: Wed, 09 Apr 2003 23:16:00 -0000 Message-ID: <20030409231600.17560.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Falk Hueffner Subject: Re: optimization/10362: Optimization with constant shifts and com pares fails on MIPS Reply-To: Falk Hueffner X-SW-Source: 2003-04/txt/msg00406.txt.bz2 List-Id: The following reply was made to PR optimization/10362; it has been noted by GNATS. From: Falk Hueffner To: Berger David-MGI2063 Cc: "'bangerth@dealii.org'" , "'gcc-bugs@gcc.gnu.org'" , "'gcc-prs@gcc.gnu.org'" , "'nobody@gcc.gnu.org'" , "'gcc-gnats@gcc.gnu.org'" Subject: Re: optimization/10362: Optimization with constant shifts and com pares fails on MIPS Date: 10 Apr 2003 01:07:44 +0200 Berger David-MGI2063 writes: > volatile unsigned long i; > > void test(void) > { > i = (((i & 0xf0) >> 4) >= 14); /* This one generates incorrect code with -O2 */ > i = ((i & 0xf0) >= (14 << 4)); /* This is what the optimizer is trying to do */ > } The optimization seems valid to me. Can you give an example where it fails? -- Falk