optimization/10362: Optimization with constant shifts and com pares fails on MIPS
Falk Hueffner
falk.hueffner@student.uni-tuebingen.de
Wed Apr 9 23:16:00 GMT 2003
The following reply was made to PR optimization/10362; it has been noted by GNATS.
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: Berger David-MGI2063 <dberger@motorola.com>
Cc: "'bangerth@dealii.org'" <bangerth@dealii.org>,
"'gcc-bugs@gcc.gnu.org'" <gcc-bugs@gcc.gnu.org>,
"'gcc-prs@gcc.gnu.org'" <gcc-prs@gcc.gnu.org>,
"'nobody@gcc.gnu.org'" <nobody@gcc.gnu.org>,
"'gcc-gnats@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 <dberger@motorola.com> 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
More information about the Gcc-prs
mailing list