[Bug target/98167] [x86] Failure to optimize operation on indentically shuffled operands into a shuffle of the result of the operation

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 11 11:27:01 GMT 2022


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

--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> ---
-fno-trapping-math tells us we are not concerned about FP exception flags (so
say spurious FP_INEXACT is OK), -fno-signalling-nans is needed as well I guess.

Oh, and in practice performing the multiplication for elements that are
NaN or denormal might trigger very slow paths in the CPU which means
the optimization could be a pessimization runtime wise.  Eventually
zeroing the unused lanes in one(?) of the operands is enough to avoid that
(for denormal, I guess 0 * NaN is still NaN).


More information about the Gcc-bugs mailing list