]> git.ipfire.org Git - thirdparty/gcc.git/commit
Change vec_perm checking and expansion level.
authorRichard Henderson <rth@redhat.com>
Tue, 25 Oct 2011 21:29:48 +0000 (14:29 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 25 Oct 2011 21:29:48 +0000 (14:29 -0700)
commit22e4dee74f73108b7dda295f6999276be12b7568
tree646bec23201b08685d3560602023733c6d9f7259
parentc3962b13f70898c51173b9f3a6bb1e369a84b459
Change vec_perm checking and expansion level.

The can_vec_perm_p interface changed to use a C integer array.  This
allows easy re-use from the rtl level and the gimple level within
the vectorizer.  It allows both to determine if a given permutation
is (un-)supported without having to create tree/rtl garbage.

The expand_vec_perm interface changed to use rtl.  This allows easy
re-use from the rtl level, so that expand_vec_perm can be used in the
fallback implementation of other optabs.

        * target.def (vec_perm_const_ok): Change parameters to mode and
        array of indicies.
        * doc/tm.texi: Rebuild.
        * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
        parameters to mode and array of indicies.
        * expr.c (expand_expr_real_2) [VEC_PERM_EXPR]: Expand operands here.
        * optabs.c (can_vec_perm_p): Rename from can_vec_perm_expr_p.
        Change parameters to mode and array of indicies.
        (expand_vec_perm_1): Rename from expand_vec_perm_expr_1.
        (expand_vec_perm): Rename from expand_vec_perm_expr.  Change
        parameters to mode and rtx inputs.  Try lowering to QImode
        vec_perm_const before trying fully variable permutation.
        * optabs.h: Update decls.
        * tree-vect-generic.c (lower_vec_perm): Extract array of indices from
        VECTOR_CST to pass to can_vec_perm_p.
        * tree-vect-slp.c (vect_get_mask_element): Change mask parameter type
        from int pointer to unsigned char pointer.
        (vect_transform_slp_perm_load): Update for change to can_vec_perm_p.
        * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.

From-SVN: r180449
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/doc/tm.texi
gcc/expr.c
gcc/optabs.c
gcc/optabs.h
gcc/target.def
gcc/tree-vect-generic.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c