https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116891
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |8.5.0
Summary|invalid optimization of |[12/13/14/15 Regression]
|-fma(-x,y,-z) when -03 and |invalid optimization of
|-frounding-math are used |-fma(-x,y,-z) when -03 and
| |-frounding-math are used
Known to fail| |9.1.0
Target Milestone|--- |12.5
Status|WAITING |NEW
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
14.2.0 match.pd line #s.
Folding statement: _4 = fma (_3, ax_18, _2);
Applying pattern match.pd:8686, gimple-match-4.cc:17507
Applying pattern match.pd:8655, gimple-match-3.cc:3934
gimple_simplified to _4 = .FNMS (ax_18, ax_18, ae_17);
Folded into: _4 = .FNMS (ax_18, ax_18, ae_17);
Folding statement: r_19 = -_4;
Applying pattern match.pd:8707, gimple-match-2.cc:4909
gimple_simplified to r_19 = .FMA (ax_18, ax_18, ae_17);
Folded into: r_19 = .FMA (ax_18, ax_18, ae_17);
(simplify
(negate (IFN_FNMS@3 @0 @1 @2))
(if (single_use (@3))
(IFN_FMA @0 @1 @2))))
I think this pattern is only valid for !flag_rounding_math.
The ones which pushes negate into FMAs kinds are only valid for
!flag_rounding_math .