https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125431
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Tamar Christina <[email protected]>: https://gcc.gnu.org/g:d5998d61eef27c98baa0307b2302e2475b9a3d64 commit r16-9125-gd5998d61eef27c98baa0307b2302e2475b9a3d64 Author: Tamar Christina <[email protected]> Date: Wed Jun 3 09:42:15 2026 +0100 vect: gate COMPLEX_MUL on FP_CONTRACT_FAST [PR125431] The checks for FP_CONTRACT_FAST were in the wrong place for complex_mul. The location it was in would only block FMA but not MUL. It would also not really reject the forming of the FMA, it would just create an invalid collection of nodes which would fail analysis later on. However complex multiplication is also a contraction, since it's doing real = a*c - b*d imag = a*d + b*c This moves the checks up to earliest possible location and actually just returns and adds the missing check for FMS. gcc/ChangeLog: PR tree-optimization/125431 * tree-vect-slp-patterns.cc (complex_mul_pattern::matches, complex_fms_pattern::matches): Gate on FP contraction. gcc/testsuite/ChangeLog: PR tree-optimization/125431 * gfortran.dg/vect/pr125431.f90: New test. (cherry picked from commit 074ed30c2382f163b74e98baa4c242a721c57519)
