diff options
author | dorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-19 18:01:51 +0000 |
---|---|---|
committer | dorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-19 18:01:51 +0000 |
commit | 9ce81338320f5a7e7df4a3c0179f2d4d8b12fd1f (patch) | |
tree | f964f19e04649f4ccaa0fd898211cec33894eb32 /gcc/testsuite/gcc.dg/vect/vect-77.c | |
parent | 615dd397c37bcd1d50f3b13227eb2fb4f2edb237 (diff) | |
download | gcc-9ce81338320f5a7e7df4a3c0179f2d4d8b12fd1f.tar.gz |
2004-09-19 Ira Rosen <irar@il.ibm.com>
* tree-vectorizer.h (stmt_vec_info): Add vect_dr_base field.
(STMT_VINFO_VECT_DR_BASE): Declare.
(VECT_SMODULO): Declare.
* tree-vectorizer.c (vect_compute_array_ref_alignment): New function.
(vect_compute_array_base_alignment): New function.
(vect_analyze_data_ref_access): Check array indices. Remove one
dimensional arrays restriction.
(vect_get_ptr_offset): New function.
(vect_get_symbl_and_dr): New function.
(vect_get_base_and_bit_offset): Support additional data refs. Renamed
(former name vect_get_base_decl_and_bit_offset).
(vect_create_index_for_array_ref): Removed.
(vect_create_index_for_vector_ref): New function.
(vect_create_addr_base_for_vector_ref): New function.
(vect_create_data_ref): Handle additional data refs. Call
vect_create_index_for_vector_ref and vect_create_addr_base_for_vector_ref.
(vect_compute_data_ref_alignment): Support the changes. Call
vect_get_base_and_bit_offset.
(vect_analyze_data_refs): Call vect_get_symbl_and_dr. Support additional
data refs. Store vect_dr_base.
(vect_analyze_data_ref_accesses): Support nonconstant init.
(new_stmt_vec_info): Initialize vect_dr_base field.
(vect_is_simple_iv_evolution): Call initial_condition_in_loop_num.
(get_vectype_for_scalar_type): Check for BLKmode.
* tree-chrec.h (initial_condition_in_loop_num): Declare.
* tree-chrec.c (initial_condition_in_loop_num): New function.
(chrec_component_in_loop_num): New function.
(evolution_part_in_loop_num): Call chrec_component_in_loop_num.
* tree-data-ref.c (analyze_array_indexes): Change parameter (access_fns)
to be pointer to varray_type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87731 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/vect-77.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-77.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77.c b/gcc/testsuite/gcc.dg/vect/vect-77.c new file mode 100644 index 00000000000..c5dacc5a881 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-77.c @@ -0,0 +1,47 @@ +/* { dg-do run { target powerpc*-*-* } } */ +/* { dg-do run { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec" { target powerpc*-*-* } } */ +/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-stats -msse" { target i?86-*-* x86_64-*-* } } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 8 +#define OFF 8 + +typedef int aint __attribute__ ((__aligned__(16))); + +aint ib[N+OFF] = {0, 1, 3, 5, 7, 11, 13, 17, 0, 2, 6, 10, 14, 22, 26, 34}; + +int main1 (aint *ib, int off) +{ + int i; + int ia[N]; + + for (i = 0; i < N; i++) + { + ia[i] = ib[i+off]; + } + + + /* check results: */ + for (i = 0; i < N; i++) + { + if (ia[i] != ib[i+off]) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + main1 (ib, 8); + return 0; +} + + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */ + |