[Bug target/126932] GCC's RISC-V auto-vectorizer emits FMA instructions with -ffp-contract=off
rdapp at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 1 13:11:47 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126932
--- Comment #6 from Robin Dapp <rdapp at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #4)
> So do we know how/why x86 is avoiding this. The only reference I see to the
> fp contract in the x86 backend is in the vector costing model.
combine will combine (plus ...) and (mult ...) into (plus (mult ...)) but not
into (fma ...). Our patterns use the former and not the latter so we'll get
spurious combinations that don't check ffp-contract.
More information about the Gcc-bugs
mailing list