optimization/10362: Optimization with constant shifts and com pares fails on MIPS
Berger David-MGI2063
dberger@motorola.com
Wed Apr 9 23:02:00 GMT 2003
Copy code below to junk.c and compile as follows: gcc -o junk.s -O2 -S junk.c
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 */ }
-----Original Message-----
From: bangerth@dealii.org [mailto:bangerth@dealii.org]
Sent: Wednesday, April 09, 2003 3:45 PM
To: David Berger; gcc-bugs@gcc.gnu.org; gcc-prs@gcc.gnu.org; nobody@gcc.gnu.org
Subject: Re: optimization/10362: Optimization with constant shifts and compares fails on MIPS
Synopsis: Optimization with constant shifts and compares fails on MIPS
State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Wed Apr 9 22:44:59 2003
State-Changed-Why:
The attachment got lost. Can you please re-send it as a
reply to this mail?
Thanks
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10362
More information about the Gcc-bugs
mailing list