https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126593
--- Comment #4 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:e5d93d8d4349597da96762e468e89af2d2ec29f1 commit r16-9981-ge5d93d8d4349597da96762e468e89af2d2ec29f1 Author: Tamar Christina <[email protected]> Date: Tue Aug 4 15:35:26 2026 +0100 vect: when REALPART/IMAGPART also check their def stmts [PR126593] The check in compatible_complex_nodes_p is a bit too loose in that we assumed that when we see a REAL/IMAG pair of statement in a TWO_OPERANDS they must have come from the same defining statement. This is of course too loose and the operands should be checked explicitly. gcc/ChangeLog: PR tree-optimization/126593 * tree-vect-slp-patterns.cc (compatible_complex_nodes_p): Check def stmts of real and imag pairs. gcc/testsuite/ChangeLog: PR tree-optimization/126593 * gcc.target/aarch64/pr126593.c: New test. (cherry picked from commit 987e38794015c2dbb5f16d7641491d3b62680743)
