https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54346
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by hongtao Liu <liuho...@gcc.gnu.org>: https://gcc.gnu.org/g:b88adba751da635c6f0c353c5bc51bbe2ecf4c89 commit r13-3212-gb88adba751da635c6f0c353c5bc51bbe2ecf4c89 Author: Liwei Xu <liwei...@intel.com> Date: Fri Sep 23 13:46:02 2022 +0800 Optimize nested permutation to single VEC_PERM_EXPR [PR54346] This patch implemented the optimization in PR 54346, which Merges c = VEC_PERM_EXPR <a, b, VCST0>; d = VEC_PERM_EXPR <c, c, VCST1>; to d = VEC_PERM_EXPR <a, b, NEW_VCST>; Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,} tree-ssa/forwprop-19.c fail to pass but I'm not sure whether it is ok to removed it. gcc/ChangeLog: PR tree-optimization/54346 * match.pd: Merge the index of VCST then generates the new vec_perm. gcc/testsuite/ChangeLog: * gcc.dg/pr54346.c: New test. Co-authored-by: liuhongt <hongtao....@intel.com>