https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88702

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Just for the record, when rewriting the code with switch:

int IsHTMLWhitespace(int aChar) {                         
  switch (aChar) {
  case 0x0009:
  case 0x000A:
  case 0x000C:
  case 0x000D:
  case 0x0020:
    return 1;
  default:
    return 0;
  }
}

one gets a nice bit-test eventually:

  <bb 2> [local count: 1073741824]:
  _4 = (unsigned int) aChar_2(D);
  if (_4 > 32)
    goto <bb 4>; [20.00%]
  else
    goto <bb 3>; [80.00%]

  <bb 3> :
  _6 = 1 << _4;
  _7 = _6 & 4294981120;
  _8 = _7 != 0;
  _5 = (int) _8;

  <bb 4> [local count: 1073741824]:
  # _1 = PHI <_5(3), 0(2)>
  return _1;

Reply via email to