https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126984
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:05f00bb42d725ebd7c530f7e0ccb14113d29ffa1 commit r17-3591-g05f00bb42d725ebd7c530f7e0ccb14113d29ffa1 Author: Richard Biener <[email protected]> Date: Mon Aug 24 10:13:33 2026 +0200 tree-optimization/126984 - ICE with complex SLP patterns As VEC_PERM nodes no longer have a representative if those are at the SLP pattern root we have to get at one by other means to be able to create the scalar pattern to use. I've noticed that complex_pattern::build isn't really a full build but is used as common helper and receives a garbled node only. So I made that not an overload of build but a true helper, leaving complex_pattern as pure abstract class. The complex_pattern CTOR then guesses the representative and stores it in a new member. PR tree-optimization/126984 * tree-vect-slp-patterns.cc (complex_pattern::build): Rename to ... (complex_pattern::build_common): ... this. (complex_pattern::build): Likewise and adjust. (complex_pattern::m_rep): New. (complex_pattern::complex_pattern): Initialize m_rep. (complex_add_pattern::build): Call build_common instead of complex_pattern::build. (complex_mul_pattern::build): Likewise. (complex_fms_pattern::build): Likewise. * gcc.dg/vect/vect-pr126984.c: New testcase.
