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

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #1)
>   x_21 = q_20(D) != 0;
>   _2 = (unsigned int) x_21;
>   _3 = _2 <= q_20(D);
>   _5 = q_20(D) == 0;
>   _25 = _3 | _5;
> 
> There is a missed optimization here.
> 
> (_2[0,1] <= q_20) | (q_20 == 0) -> (_2[0,1] <= q_20)

So I am wrong in what the simplification is, rather it is true always.
```
int f(unsigned a, unsigned b)
{
  if (b > 1) return 1;
  int c = a == 0;
  int d = b <= a;
  return c|d;
}
```

That alone will be enough to get rid of the compile time issue here.  But not
in the general case.

Reply via email to