------- 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