https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126589
--- Comment #2 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:3565f0b780965a097fdeea07b94fcfe768998a65 commit r17-2946-g3565f0b780965a097fdeea07b94fcfe768998a65 Author: Tamar Christina <[email protected]> Date: Tue Aug 4 15:24:53 2026 +0100 vect: try all 8 multiplication orderings for complex patterns [PR126589] PR126589 make COMPLEX_MUL require -fno-signed-zeros for AArch64, but when using this we miss many of the complex matching. This is because we get a different order of the operands for multiplication. We normally try just flipping the two multiplies around but not their operands. This patch changes it to try all 8 variants. Note that they still have to pass compatible_complex_nodes_p and df analysis in linear_loads_p so we won't accept invalid combinations. There are no tests for this but it prevents patch 2 from introducing failures. gcc/ChangeLog: PR target/126589 * tree-vect-slp-patterns.cc (vect_validate_multiplication): Refactor. (vect_validate_multiplication_commutative): New. (complex_mul_pattern::matches, complex_fms_pattern::matches): Use it.
