[Bug middle-end/71614] ppc __gcc_qmul is mis-optimized not to be commutative
timshen at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 22 01:28:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71614
--- Comment #3 from Tim Shen <timshen at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> Two things, try -fno-strict-aliasing first.
> Since your main violates C aliasing rules.
> Second thing to try is -ffp-contract=off as I am suspecting:
> v = a*d;
> w = b*c;
> tau += v + w; /* Add in other second-order terms. */
> u = t + tau;
>
> is using an fmadd here.
Passing -fno-strict-aliasing doesn't change the -O2 result; -ffp-contract=off
does give the consistent result as -O1.
What result is __gcc_qmul supposed to give? As a user I'd expect the
commutativity here.
More information about the Gcc-bugs
mailing list