This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/83350] Missed optimization in math expression: missing cube of the sum formula


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]