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/16797] Opportunity to remove unnecessary load instructions


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


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