diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-25 21:29:56 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-25 21:29:56 +0000 |
commit | 6620d7d7c5f2fe5df0df2b85e143746f76fdd4cf (patch) | |
tree | 45f2e4d1399a268bc62cbc1f51000ceee9bcc2b1 /gcc/tree-vect-generic.c | |
parent | e21c468f20819a1d6545741af280a77e4f89c8e0 (diff) | |
download | gcc-6620d7d7c5f2fe5df0df2b85e143746f76fdd4cf.tar.gz |
Implement interleave via permutation.
* expr.c (expand_expr_real_2) [VEC_EXTRACT_EVEN_EXPR]: Use binop.
[VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR]: Likewise.
[VEC_INTERLEAVE_LOW_EXPR]: Likewise.
* optabs.c (expand_binop): Implement vec_interleave_high_optab,
vec_interleave_low_optab, vec_extract_even_optab,
vec_extract_odd_optab with expand_vec_perm.
(can_vec_perm_for_code_p): New.
* optabs.h: Update.
* tree-vect-data-refs.c (vect_strided_store_supported): Allow for
fallback via can_vec_perm_for_code_p.
(vect_strided_load_supported): Likewise.
* tree-vect-generic.c (expand_vector_operations_1): Never lower
VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR,
VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180450 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r-- | gcc/tree-vect-generic.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index 42ce2e3d729..ccbec6ebac6 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -771,6 +771,15 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi) || code == VIEW_CONVERT_EXPR) return; + /* These are only created by the vectorizer, after having queried + the target support. It's more than just looking at the optab, + and there's no need to do it again. */ + if (code == VEC_INTERLEAVE_HIGH_EXPR + || code == VEC_INTERLEAVE_LOW_EXPR + || code == VEC_EXTRACT_EVEN_EXPR + || code == VEC_EXTRACT_ODD_EXPR) + return; + gcc_assert (code != CONVERT_EXPR); /* The signedness is determined from input argument. */ |