diff options
author | Ira Rosen <irar@il.ibm.com> | 2010-10-11 12:18:47 +0000 |
---|---|---|
committer | Ira Rosen <irar@gcc.gnu.org> | 2010-10-11 12:18:47 +0000 |
commit | 4907769827b246d80145601c6fa5caf84f04f941 (patch) | |
tree | 5be2c3e76b5811cc4125f6b3ca857977cbda9646 /gcc/tree-vect-slp.c | |
parent | a6510374cc351047417e6211b7f8391a1eeebf30 (diff) | |
download | gcc-4907769827b246d80145601c6fa5caf84f04f941.zip gcc-4907769827b246d80145601c6fa5caf84f04f941.tar.gz gcc-4907769827b246d80145601c6fa5caf84f04f941.tar.bz2 |
re PR tree-optimization/45902 (CPU2006 benchmark sphinx3 fails with vectorization)
PR tree-optimization/45902
* tree-vect-slp.c (vect_get_constant_vectors): Use statement's
vector type for constants, unless it's a pointer.
From-SVN: r165302
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index 2dbe328..784db84 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -1895,13 +1895,20 @@ vect_get_constant_vectors (slp_tree slp_node, VEC(tree,heap) **vec_oprnds, } if (CONSTANT_CLASS_P (op)) - constant_p = true; + { + constant_p = true; + if (POINTER_TYPE_P (TREE_TYPE (gimple_assign_lhs (stmt)))) + vector_type = get_vectype_for_scalar_type (TREE_TYPE (op)); + else + vector_type = STMT_VINFO_VECTYPE (stmt_vinfo); + } else - constant_p = false; + { + constant_p = false; + vector_type = get_vectype_for_scalar_type (TREE_TYPE (op)); + } - vector_type = get_vectype_for_scalar_type (TREE_TYPE (op)); gcc_assert (vector_type); - nunits = TYPE_VECTOR_SUBPARTS (vector_type); /* NUMBER_OF_COPIES is the number of times we need to use the same values in |