]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/116891 - fix (negate (IFN_FNMS@3 @0 @1 @2)) -> (IFN_FMA @0 @1 @2)
authorRichard Biener <rguenther@suse.de>
Mon, 14 Oct 2024 06:11:22 +0000 (08:11 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 17 Jan 2025 08:52:53 +0000 (09:52 +0100)
commitc0c5db68331ea8814db45ecd90ba842818e623fa
tree060839ca22f560ff385a13c0159047cc4d57da52
parent4e5e70e645f02bc956e1ac529ec6498eb281ec26
middle-end/116891 - fix (negate (IFN_FNMS@3 @0 @1 @2)) -> (IFN_FMA @0 @1 @2)

Transforming -fma (-a, b, -c) to fma (a, b, c) is only valid when
not rounding towards -inf or +inf as the sign of the multiplication
changes.

PR middle-end/116891
* match.pd ((negate (IFN_FNMS@3 @0 @1 @2)) -> (IFN_FMA @0 @1 @2)):
Only enable for !HONOR_SIGN_DEPENDENT_ROUNDING.

(cherry picked from commit c53bd48c6920bc1f4039b6682aafbf414a600e47)
gcc/match.pd