This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18589] could optimize FP multiplies better
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Mar 2006 17:43:30 -0000
- Subject: [Bug tree-optimization/18589] could optimize FP multiplies better
- References: <bug-18589-5724@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-03-05 17:43 -------
In 4.2.0 and above we get:
baz:
.LFB2:
mulsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm0, %xmm0
ret
Which is what I recommend but we don't get that on the tree level:
return bar * bar * __builtin_pow (foo, 4.0e+0) * bar * bar;
So this is just a tree level missed optimization.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |TREE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18589