This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/83350] Missed optimization in math expression: missing cube of the sum formula
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Dec 2017 09:03:19 +0000
- Subject: [Bug tree-optimization/83350] Missed optimization in math expression: missing cube of the sum formula
- Auto-submitted: auto-generated
- References: <bug-83350-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83350
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-12-11
CC| |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We're associating it a bit but we do not know of the power identities like
(a + b)^2 = a*a + 2*a*b + b*b
eventually undistribute_ops_list could be used to implement a generic variant
as it already searches for a similar pattern to apply reverse distribution law
a*a + a*b -> a * (a + b).
Note that at some point of complexity I view such transforms as responsibility
of the programmer rather than the compiler... (this one is on the border)