summaryrefslogtreecommitdiff
path: root/gcc/target.def
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-25 21:29:48 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-25 21:29:48 +0000
commite21c468f20819a1d6545741af280a77e4f89c8e0 (patch)
tree646bec23201b08685d3560602023733c6d9f7259 /gcc/target.def
parent4b50824be623275a757eacd82ef171fd69cf455f (diff)
downloadgcc-e21c468f20819a1d6545741af280a77e4f89c8e0.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180449 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target.def')
-rw-r--r--gcc/target.def7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/target.def b/gcc/target.def
index 60fad2a813a..f89bb519369 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -985,12 +985,13 @@ DEFHOOK
bool, (const_tree type, bool is_packed),
default_builtin_vector_alignment_reachable)
-/* Return true if a vector created for vec_perm_const is valid. */
+/* Return true if a vector created for vec_perm_const is valid.
+ A NULL indicates that all constants are valid permutations. */
DEFHOOK
(vec_perm_const_ok,
"",
- bool, (tree vec_type, tree mask),
- hook_bool_tree_tree_true)
+ bool, (enum machine_mode, const unsigned char *sel),
+ NULL)
/* Return true if the target supports misaligned store/load of a
specific factor denoted in the third parameter. The last parameter