tree-vect-stmts.c (vectorizable_store): Accept BIT_FIELD_REF.
2013-04-03 Marc Glisse <marc.glisse@inria.fr> gcc/ * tree-vect-stmts.c (vectorizable_store): Accept BIT_FIELD_REF. (vectorizable_load): Likewise. * tree-vect-slp.c (vect_build_slp_tree): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Handle VECTOR_TYPE. gcc/testsuite/ * gcc.dg/vect/bb-slp-31.c: New file. From-SVN: r197410
This commit is contained in:
parent
3fa3529889
commit
38000232d1
|
@ -1,3 +1,10 @@
|
|||
2013-04-03 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
* tree-vect-stmts.c (vectorizable_store): Accept BIT_FIELD_REF.
|
||||
(vectorizable_load): Likewise.
|
||||
* tree-vect-slp.c (vect_build_slp_tree): Likewise.
|
||||
* tree-vect-data-refs.c (vect_create_data_ref_ptr): Handle VECTOR_TYPE.
|
||||
|
||||
2013-04-03 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
* tree-flow-inline.h (get_addr_base_and_unit_offset_1): Handle
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2013-04-03 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
* gcc.dg/vect/bb-slp-31.c: New file.
|
||||
|
||||
2013-04-03 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/34949
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-require-effective-target vect_double } */
|
||||
|
||||
typedef double vec __attribute__ ((vector_size (2 * sizeof (double))));
|
||||
vec a;
|
||||
|
||||
void f(){
|
||||
a[0]=1+2*a[0]*a[0];
|
||||
a[1]=1+2*a[1]*a[1];
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump "basic block vectorized using SLP" "slp" } } */
|
|
@ -3613,6 +3613,8 @@ vect_create_data_ref_ptr (gimple stmt, tree aggr_type, struct loop *at_loop,
|
|||
dump_generic_expr (MSG_NOTE, TDF_SLIM, aggr_type);
|
||||
if (TREE_CODE (dr_base_type) == ARRAY_TYPE)
|
||||
dump_printf (MSG_NOTE, " vectorizing an array ref: ");
|
||||
else if (TREE_CODE (dr_base_type) == VECTOR_TYPE)
|
||||
dump_printf (MSG_NOTE, " vectorizing a vector ref: ");
|
||||
else if (TREE_CODE (dr_base_type) == RECORD_TYPE)
|
||||
dump_printf (MSG_NOTE, " vectorizing a record based array ref: ");
|
||||
else
|
||||
|
|
|
@ -667,6 +667,7 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo,
|
|||
|| rhs_code != IMAGPART_EXPR)
|
||||
&& !(STMT_VINFO_GROUPED_ACCESS (vinfo_for_stmt (stmt))
|
||||
&& (first_stmt_code == ARRAY_REF
|
||||
|| first_stmt_code == BIT_FIELD_REF
|
||||
|| first_stmt_code == INDIRECT_REF
|
||||
|| first_stmt_code == COMPONENT_REF
|
||||
|| first_stmt_code == MEM_REF)))
|
||||
|
|
|
@ -3851,6 +3851,7 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
|
|||
&& is_pattern_stmt_p (stmt_info))
|
||||
scalar_dest = TREE_OPERAND (scalar_dest, 0);
|
||||
if (TREE_CODE (scalar_dest) != ARRAY_REF
|
||||
&& TREE_CODE (scalar_dest) != BIT_FIELD_REF
|
||||
&& TREE_CODE (scalar_dest) != INDIRECT_REF
|
||||
&& TREE_CODE (scalar_dest) != COMPONENT_REF
|
||||
&& TREE_CODE (scalar_dest) != IMAGPART_EXPR
|
||||
|
@ -4385,6 +4386,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
|
|||
|
||||
code = gimple_assign_rhs_code (stmt);
|
||||
if (code != ARRAY_REF
|
||||
&& code != BIT_FIELD_REF
|
||||
&& code != INDIRECT_REF
|
||||
&& code != COMPONENT_REF
|
||||
&& code != IMAGPART_EXPR
|
||||
|
|
Loading…
Reference in New Issue