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
This commit is contained in:
parent
a6510374cc
commit
4907769827
4 changed files with 65 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
43
gcc/testsuite/gcc.dg/vect/pr45902.c
Normal file
43
gcc/testsuite/gcc.dg/vect/pr45902.c
Normal file
|
@ -0,0 +1,43 @@
|
|||
/* { 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;
|
||||
{
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue