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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-05-25
                 CC|                            |aoliva at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
ifcombine causes the issue.

Before ifcombine we have:
```
  _5 = b.1_1 ^ 65533;
  b = _5;
  _2 = (unsigned char) _5;
  _13 = _5 & 240;
  if (_13 != 0)
    goto <bb 6>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 4> [local count: 488069348]:
  if (_2 != 0)
    goto <bb 6>; [67.00%]
  else
    goto <bb 5>; [33.00%]

  <bb 5> [local count: 161062884]:
  marker_171 ();
```

So this is basically 

if ((_5&0xf0 == 0) & (_5&0xff == 0))
  marker_171 ();

Which should be optimized to:
if (_5&0xff == 0)
  marker_171 ();

But rather we are converting changing the conditional to 0; the ^ -3 seems to
be getting in the way.

Reply via email to