https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423
--- Comment #1 from Gabriel Ravier ---
I've hit a similar thing with this function :
int f(int x)
{
return (x * x * x) - (3 * x) - 1;
}
Which can be optimized to `return (((x * x) - 3) * x) - 1;`, but isn't
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423
--- Comment #2 from Andrew Pinski ---
Could there be overflows which don't happen originally?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423
--- Comment #3 from Marc Glisse ---
We manage it with -fwrapv. This should happen late when we don't care about
overflow anymore, or it needs to introduce casts to an unsigned type.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423
Richard Biener changed:
What|Removed |Added
Last reconfirmed||2020-06-02
Status|UNCONFIRM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423
--- Comment #5 from joseph at codesourcery dot com ---
On Fri, 29 May 2020, pinskia at gcc dot gnu.org wrote:
> Could there be overflows which don't happen originally?
Yes. Say a == INT_MIN, x == -1, b == 0, for example. (This
transformation