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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=19832

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>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;
}
```

Reply via email to