[Bug tree-optimization/52976] [4.8 Regression] Revision 186384 breaks the polyhedron tests aermod.f90 and doduc.f90 at -O3 -ffast-math

wschmidt at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 13 19:46:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52976

--- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2012-04-13 19:41:18 UTC ---
When changing from the original form of the patch to the form that recorded
repeated ops in the ops table, I missed the effect on undistribution where a
term contains a multiply of a repeated op.  Those terms should be excluded from
undistribution to return to the former behavior, and I'll work on fixing that
for the short term.  However, it would eventually be better to factor a P out
of the example in this case:

c1 + 2.*P*c2 + 3.*P**2*c3 ==>  c1 + P * (2.*c2 + 3.*P*c3)

In the original form of the patch, this was handled naturally because P**2 was
expanded into P*P and the existing logic was sufficient.  I just missed the
need to add some logic to undistribution.



More information about the Gcc-bugs mailing list