[Bug tree-optimization/16797] Opportunity to remove unnecessary load instructions

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Sep 10 17:59:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-10 17:59 -------
Another testcase which effects all targets:
int logic_func1(int b, int d) {
  if (d< b) return b+3; else return d+3;
}

int logic_func2(int b, int d)
{
  int a;
  if (d< b) a = b; else a = d;
  return a+3;
}

Basicially if we move the +3 to the common code, this would be better  (note in the orginal testcase it is 
a cast).

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16797



More information about the Gcc-bugs mailing list