diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2013-04-03 14:59:46 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2013-04-03 12:59:46 +0000 |
commit | 38000232d10a651d985f247550b2e41425150852 (patch) | |
tree | 456df88245b81a49798cdc2638114da97409edbb | |
parent | 3fa352988912a70aeeea7e8cdd79466c287c18f1 (diff) | |
download | gcc-38000232d10a651d985f247550b2e41425150852.zip gcc-38000232d10a651d985f247550b2e41425150852.tar.gz gcc-38000232d10a651d985f247550b2e41425150852.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/bb-slp-31.c | 12 | ||||
-rw-r--r-- | gcc/tree-vect-data-refs.c | 2 | ||||
-rw-r--r-- | gcc/tree-vect-slp.c | 1 | ||||
-rw-r--r-- | gcc/tree-vect-stmts.c | 2 |
6 files changed, 28 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1acdadb..69afaf3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 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 BIT_FIELD_REF. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 30e1964..e9482cb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-31.c b/gcc/testsuite/gcc.dg/vect/bb-slp-31.c new file mode 100644 index 0000000..9a3eac6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-31.c @@ -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" } } */ diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 128e874..bb0b693 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -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 diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index e925f57..a9cf692 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -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))) diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 9cadc50..a5bd819 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -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 |