https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81616
Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jamborm at gcc dot gnu.org --- Comment #38 from Martin Jambor <jamborm at gcc dot gnu.org> --- Created attachment 42872 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42872&action=edit Untested fix for harmful FMAs (In reply to Jan Hubicka from comment #25) > Hi, I agree that the matric multiplication fma issue is > important and hopefully it will be fixed for GCC 8. See > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00437.html I am testing the attached patch to address the FMA generation. I plan to submit it to the mailing list this week if everything goes fine but I would be very grateful for any comments or additional testing/benchmarking. The patch brings the run-time of the matrix.c testcase with native znver1 tuning down to the levels seen with generic tuning, without it I see 60% regressions at both -O2 and -O3. (Even with the patch, using -mprefer-vector-width=256 can still do quite a bit better but at least the difference is now 20% and not 100%).