diff options
author | dorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-19 08:46:45 +0000 |
---|---|---|
committer | dorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-19 08:46:45 +0000 |
commit | 435c10320330151f08321bbbc821a4084cfb7c72 (patch) | |
tree | 5db2d0b024834594c5a831e83a077e055f02ce2d /gcc | |
parent | ec72623f7c8d0a87c87160c3c07e0f607c589b1c (diff) | |
download | gcc-435c10320330151f08321bbbc821a4084cfb7c72.tar.gz |
PR tree-optimization/30975
* tree-vect-trasnform.c (vect_get_vec_def_for_stmt_copy): Remove
wrong assert.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122127 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/pr30795.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-iv-8.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-iv-8a.c | 43 | ||||
-rw-r--r-- | gcc/tree-vect-transform.c | 2 |
6 files changed, 83 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 38e0204acb1..f0f225ce4e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-02-19 Dorit Nuzman <dorit@il.ibm.com> + + PR tree-optimization/30975 + * tree-vect-trasnform.c (vect_get_vec_def_for_stmt_copy): Remove + wrong assert. + 2007-02-18 Eric Christopher <echristo@gmail.com> * mips.c (mips_prepare_builtin_arg): Add argnum parameter. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8540aaca729..3633d7d1cf8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2007-02-18 Dorit Nuzman <dorit@il.ibm.com> + + PR tree-optimization/30975 + * gcc.dg/vect/vect-iv-8.c: Fix to include an induction. Xfail. + * gcc.dg/vect/vect-iv-8a.c: New (same as above, but signed). + * gcc.dg/vect/pr30795.c: New. + 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/30681 diff --git a/gcc/testsuite/gcc.dg/vect/pr30795.c b/gcc/testsuite/gcc.dg/vect/pr30795.c new file mode 100644 index 00000000000..53dc9fa51f3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr30795.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ + +char bigDone[260]; +int runningOrder[260]; + +int +main() +{ + int i; + for (i = 0; i <= 255; i++) { + bigDone [i] = ((char)0); + runningOrder[i] = i; + } + return 0; +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-8.c b/gcc/testsuite/gcc.dg/vect/vect-iv-8.c index a2d4e375299..f8626a1a58f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-iv-8.c +++ b/gcc/testsuite/gcc.dg/vect/vect-iv-8.c @@ -10,6 +10,7 @@ int main1 (short X) unsigned char a[N]; unsigned short b[N]; unsigned int c[N]; + short myX = X; int i; /* vectorization of induction with type conversions. */ @@ -18,12 +19,13 @@ int main1 (short X) a[i] = (unsigned char)X; b[i] = X; c[i] = (unsigned int)X; + X++; } /* check results: */ for (i = 0; i < N; i++) { - if (a[i] != (char)X || b[i] != X || c[i] != (int)X) + if (a[i] != (unsigned char)myX || b[i] != myX || c[i] != (unsigned int)myX++) abort (); } @@ -37,5 +39,9 @@ int main (void) return main1 (3); } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_mod && vect_unpack } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */ +/* Fails to get vectorized due to a redundant cast. Once this is fixed, + should be vectorized as follows: + dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_mod && vect_unpack } } } +*/ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-8a.c b/gcc/testsuite/gcc.dg/vect/vect-iv-8a.c new file mode 100644 index 00000000000..ac6bde7210c --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/vect-iv-8a.c @@ -0,0 +1,43 @@ +/* { dg-require-effective-target vect_int } */ + +#include <stdarg.h> +#include "tree-vect.h" + +#define N 26 + +int main1 (short X) +{ + signed char a[N]; + short b[N]; + int c[N]; + short myX = X; + int i; + + /* vectorization of induction with type conversions. */ + for (i = 0; i < N; i++) + { + a[i] = (signed char)X; + b[i] = X; + c[i] = (int)X; + X++; + } + + /* check results: */ + for (i = 0; i < N; i++) + { + if (a[i] != (signed char)myX || b[i] != myX || c[i] != (int)myX++) + abort (); + } + + return 0; +} + +int main (void) +{ + check_vect (); + + return main1 (3); +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_mod && vect_unpack } } } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c index 07c077329a3..109705d7e14 100644 --- a/gcc/tree-vect-transform.c +++ b/gcc/tree-vect-transform.c @@ -897,8 +897,6 @@ vect_get_vec_def_for_stmt_copy (enum vect_def_type dt, tree vec_oprnd) vec_stmt_for_operand = SSA_NAME_DEF_STMT (vec_oprnd); def_stmt_info = vinfo_for_stmt (vec_stmt_for_operand); - if (dt == vect_induction_def) - gcc_assert (TREE_CODE (vec_stmt_for_operand) == PHI_NODE); gcc_assert (def_stmt_info); vec_stmt_for_operand = STMT_VINFO_RELATED_STMT (def_stmt_info); gcc_assert (vec_stmt_for_operand); |