https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125431
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tamar Christina <[email protected]>: https://gcc.gnu.org/g:074ed30c2382f163b74e98baa4c242a721c57519 commit r17-1250-g074ed30c2382f163b74e98baa4c242a721c57519 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.
