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 rtl-optimization/11832] Optimization of common code in switch statements



------- Comment #6 from aldot at gcc dot gnu dot org  2008-01-03 09:19 -------
Dummy sample that has a hoisting opportunity:

int bazoo (unsigned int in)
{
  int i = 0;
  if (in >= 0)
    ++i; /* hoist */
  if (in >= 1)
    ++i;
  if (in >= 2)
    ++i;
  if (in >= 3)
    ++i;
  if (in >= 4)
    ++i;
  return i;
}


-- 


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


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