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

--- Comment #4 from gooncreeper <goon.pri.low at gmail dot com> ---
(In reply to Andrew Pinski from comment #2)
> >Note: this happens for all operators, not just addition!
> 
> Actually it is just addition with a constant on the trunk.
> ```
> int g(int v, int b) {
>     if (v - b)
>         return v - b ;
>     else
>         return 0;
> }
> ```
> was handled with PR 19832.
> 
> 
> I see division with a constant is not handled though:
> ```
> int unopt(int v, int b) {
>     if (v /2)
>         return v / 2;
>     else
>         return 0;
> }
> ```


I am not quite testing on the trunk build but I also believe modulo

Reply via email to