[Bug tree-optimization/71823] [6/7 Regression] g++ segfaults with -mfma and -ftree-slp-vectorize

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 11 11:57:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71823

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #5)
> (In reply to Jakub Jelinek from comment #2)
> >     b[i] = __builtin_fma (0.0f, 0.0f, a[i]);
> 
> I am surprised we don't optimize that line, at least with -fno-signed-zeros.
> If the testcase still works with less trivial numbers, that might be better,
> in case we add such optimizations in the future?

I've changed the testcase to
__builtin_fma (1024.0f, 1024.0f, a[i]);
which ICEs without the patch the same way.

Feel free to open an enhancement PR for the fma (0, 0, ...) or fma (..., ...,
0)
cases which indeed could be folded at least for -ffast-math to the last
argument or multiplication of the first two arguments.


More information about the Gcc-bugs mailing list