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

--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> ---
GCC 14.3.0's ifcombine produced:
  d_2 = a_1(D) ^ 256;
  t_3 = (unsigned char) d_2;
  _6 = a_1(D) != 256;
  _7 = t_3 != 0;
  _8 = _6 | _7;

Some how the truncation is being missed I think.

If anything this should be optimized to:
 // d_2 = a_1(D) ^ 256;
 // t_3 = (unsigned char) d_2;
  _4 = (unsigned char) a_1(D);
  _6 = a_1(D) != 256;
  _7 = _4 != 0;
  _8 = _6 | _7;

Or rather just:
  _8 = a_1(D) != 256;

Reply via email to