https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125875
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:d7e04528080c1ae202c7021677dd60cef03df436 commit r16-9272-gd7e04528080c1ae202c7021677dd60cef03df436 Author: Richard Biener <[email protected]> Date: Fri Jun 26 10:55:29 2026 +0200 middle-end/125875 - incomplete guards on VEC_PERM_EXPR folding This fixes up match.pd patterns using can_vec_perm_const_p on existing permutations to indicate whether we are before or after vector lowering. For this to be correct we have to use the new vec_perm_indices CTOR taking the actual permuted inputs so can_vec_perm_const_p can also handle the vec_shl/vec_shr expansion path. PR middle-end/125875 * match.pd: When checking for !can_vec_perm_const_p also allow variable permutes and use the vec_perm_indices CTOR with the original tree operands. * gcc.dg/torture/pr125875.c: New testcase. (cherry picked from commit f3475825fe0c609482ab30714f2d616f9c7b8fd7)
