[Bug tree-optimization/95423] Failure to optimize separated multiplications by x and square of x

2021-12-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug tree-optimization/95423] Failure to optimize separated multiplications by x and square of x

2020-05-29 Thread gabravier at gmail dot com
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

[Bug tree-optimization/95423] Failure to optimize separated multiplications by x and square of x

2020-05-29 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423 --- Comment #2 from Andrew Pinski --- Could there be overflows which don't happen originally?

[Bug tree-optimization/95423] Failure to optimize separated multiplications by x and square of x

2020-05-29 Thread glisse at gcc dot gnu.org
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.

[Bug tree-optimization/95423] Failure to optimize separated multiplications by x and square of x

2020-06-01 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95423 Richard Biener changed: What|Removed |Added Last reconfirmed||2020-06-02 Status|UNCONFIRM

[Bug tree-optimization/95423] Failure to optimize separated multiplications by x and square of x

2020-06-03 Thread joseph at codesourcery dot com
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