This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/16632] A couple fold-const.c optimizations are non-functional
- From: "trt at acm dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jul 2004 16:50:22 -0000
- Subject: [Bug tree-optimization/16632] A couple fold-const.c optimizations are non-functional
- References: <20040719180516.16632.trt@acm.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From trt at acm dot org 2004-07-20 16:50 -------
Silly me, the demo code should have returned a value:
int subr(int i)
{
if ((i|3) == 1) return 1; /* never taken */
if ((i&4) == 2) return 1; /* never taken */
return 0;
}
This should simplify to "return 0;" but the assembler code retains the 'or'
and 'and' even at high optimization levels.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16632