]> git.ipfire.org Git - thirdparty/gcc.git/commit
Optimize nested permutation to single VEC_PERM_EXPR [PR54346]
authorLiwei Xu <liwei.xu@intel.com>
Fri, 23 Sep 2022 05:46:02 +0000 (13:46 +0800)
committerliuhongt <hongtao.liu@intel.com>
Tue, 11 Oct 2022 06:08:31 +0000 (14:08 +0800)
commitb88adba751da635c6f0c353c5bc51bbe2ecf4c89
treee6b158b66b12afe79761044260dfe168c2f4df12
parentdb24bdc743cf23ea12d2dcf8254d86ab366bb46d
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.liu@intel.com>
gcc/match.pd
gcc/testsuite/gcc.dg/pr54346.c [new file with mode: 0755]