aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-generic.c
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2013-05-13 11:30:50 +0200
committerMarc Glisse <glisse@gcc.gnu.org>2013-05-13 09:30:50 +0000
commit640bfeb25ce9b2f645c75d1e04ecce9ad74c4be1 (patch)
treeed915c07d5e51d4f597a85fe3b3ee5781b72abfd /gcc/tree-vect-generic.c
parent198fe1bfebf81e2a13b223bedcb41ed34d426862 (diff)
downloadgcc-640bfeb25ce9b2f645c75d1e04ecce9ad74c4be1.zip
gcc-640bfeb25ce9b2f645c75d1e04ecce9ad74c4be1.tar.gz
gcc-640bfeb25ce9b2f645c75d1e04ecce9ad74c4be1.tar.bz2
tree-vect-generic.c (uniform_vector_p): Move ...
2013-05-13 Marc Glisse <marc.glisse@inria.fr> gcc/ * tree-vect-generic.c (uniform_vector_p): Move ... * tree.c (uniform_vector_p): ... here. * tree.h (uniform_vector_p): Declare it. * fold-const.c (fold_binary_loc) <shift>: Turn the second argument into a scalar. gcc/testsuite/ * gcc.dg/vector-shift-2.c: New testcase. From-SVN: r198819
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r--gcc/tree-vect-generic.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index dbad6d9..516bd6f 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -326,52 +326,6 @@ expand_vector_addition (gimple_stmt_iterator *gsi,
a, b, code);
}
-/* Check if vector VEC consists of all the equal elements and
- that the number of elements corresponds to the type of VEC.
- The function returns first element of the vector
- or NULL_TREE if the vector is not uniform. */
-static tree
-uniform_vector_p (tree vec)
-{
- tree first, t;
- unsigned i;
-
- if (vec == NULL_TREE)
- return NULL_TREE;
-
- if (TREE_CODE (vec) == VECTOR_CST)
- {
- first = VECTOR_CST_ELT (vec, 0);
- for (i = 1; i < VECTOR_CST_NELTS (vec); ++i)
- if (!operand_equal_p (first, VECTOR_CST_ELT (vec, i), 0))
- return NULL_TREE;
-
- return first;
- }
-
- else if (TREE_CODE (vec) == CONSTRUCTOR)
- {
- first = error_mark_node;
-
- FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (vec), i, t)
- {
- if (i == 0)
- {
- first = t;
- continue;
- }
- if (!operand_equal_p (first, t, 0))
- return NULL_TREE;
- }
- if (i != TYPE_VECTOR_SUBPARTS (TREE_TYPE (vec)))
- return NULL_TREE;
-
- return first;
- }
-
- return NULL_TREE;
-}
-
/* Try to expand vector comparison expression OP0 CODE OP1 by
querying optab if the following expression:
VEC_COND_EXPR< OP0 CODE OP1, {-1,...}, {0,...}>