This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/16632] A couple fold-const.c optimizations are non-functional


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]