Commit 49077698 by Ira Rosen Committed by Ira Rosen

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
parent a6510374
2010-10-11 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/45902
* tree-vect-slp.c (vect_get_constant_vectors): Use statement's
vector type for constants, unless it's a pointer.
2010-10-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.md (*mov<mode>cc): lgoc -> locg and stgoc -> stocg.
2010-10-11 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/45902
* gcc.dg/vect/45902.c: New test.
2010-10-11 Jakub Jelinek <jakub@redhat.com>
PR target/45870
......
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
#include <stdlib.h>
#include "tree-vect.h"
#define N 128
short res[N];
short a[N];
int
main1 ()
{
int i;
for (i = 0; i < N/4; i+=4)
{
res[i] = a[i] >> 8;
res[i+1] = a[i+1] >> 8;
res[i+2] = a[i+2] >> 8;
res[i+3] = a[i+3] >> 8;
}
}
int
main ()
{
int i;
for (i = 0; i < N; i++)
a[i] = i;
main1 ();
for (i = 0; i < N; i++)
if (res[i] != a[i] >> 8)
abort ();
return 0;
}
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -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;
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;
vector_type = get_vectype_for_scalar_type (TREE_TYPE (op));
gcc_assert (vector_type);
}
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment