https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126589
--- Comment #5 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:d9b294889b14069d6f6c5ce985f17bf8bbf34894 commit r17-3228-gd9b294889b14069d6f6c5ce985f17bf8bbf34894 Author: Tamar Christina <[email protected]> Date: Wed Aug 12 14:15:43 2026 +0100 vect: Support another form of COMPLEX_FMS which the testcases point out [PR126589] This adds support for matching FMS where the reassoc has left the top level operation as a PLUS_MINUS. i.e. matching c.real + (a.imag * b.imag - a.real * b.real) c.imag - (a.real * b.imag + a.imag * b.real) which happens when the accumulator is not the same as the destination. i.e. d[i] = c[i] - (a[i] * b[i]) vs c[i] -= a[i] * b[i] gcc/ChangeLog: PR tree-optimization/126589 * tree-vect-slp-patterns.cc (complex_fms_pattern::matches): Check another form of FMS. gcc/testsuite/ChangeLog: PR tree-optimization/126589 * gfortran.target/aarch64/pr122408_1.f90: update scans to check for FMS. * gcc.dg/vect/complex/complex-mul2.c: New test. * gcc.dg/vect/complex/fast-math-complex-mls-manual-invalid-float.c: New test. * gcc.dg/vect/complex/fast-math-complex-mls-outofplace-double.c: New test. * gcc.dg/vect/complex/fast-math-complex-mls-outofplace-float.c: New test.
