This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19988] [4.3/4.4/4.5 Regression] pessimizes fp multiply-add/subtract combo
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jan 2010 19:09:41 -0000
- Subject: [Bug middle-end/19988] [4.3/4.4/4.5 Regression] pessimizes fp multiply-add/subtract combo
- References: <bug-19988-9955@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #18 from rguenth at gcc dot gnu dot org 2010-01-16 19:09 -------
Created an attachment (id=19626)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19626&action=view)
VN based fix
This extends the value-numberers value insertion facility to handle this
special case. Well, it needs TLC obviously - it was just a quick hack.
We now end up with
<bb 2>:
D.2649_2 = y_1(D) * 1.23399999999999995803356966916908277198672294617e-1;
D.2650_4 = D.2649_2 + x_3(D);
pretmp.1_9 = -D.2649_2;
D.2652_6 = x_3(D) + pretmp.1_9;
D.2648_7 = D.2650_4 * D.2652_6;
return D.2648_7;
probably the same as 3.3. Another interesting bit is that we do not ever
merge the negation into the addition on the tree level (we do that only
during combine).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19988