diff options
author | Ira Rosen <irar@il.ibm.com> | 2007-10-24 09:35:00 +0000 |
---|---|---|
committer | Ira Rosen <irar@gcc.gnu.org> | 2007-10-24 09:35:00 +0000 |
commit | 712f1172209b203503199c653f103fb7fb817005 (patch) | |
tree | 5442eb396e2bf2c2b415714edca5fed9b821b0b0 /gcc | |
parent | 20e545c381eecde36210a913e013e588422a3cef (diff) | |
download | gcc-712f1172209b203503199c653f103fb7fb817005.zip gcc-712f1172209b203503199c653f103fb7fb817005.tar.gz gcc-712f1172209b203503199c653f103fb7fb817005.tar.bz2 |
re PR tree-optimization/33804 (ICE in vect_transform_stmt, at tree-vect-transform.c:6131 with -ftree-vectorize)
PR tree-optimization/33804
* tree-vect-transform.c (vectorizable_operation): Remove the
checks that the vectorization is worthwhile from the transformation
phase.
From-SVN: r129599
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/pr33804.c | 17 | ||||
-rw-r--r-- | gcc/tree-vect-transform.c | 11 |
4 files changed, 36 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c53f62..7ace9f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2007-10-24 Ira Rosen <irar@il.ibm.com> + PR tree-optimization/33804 + * tree-vect-transform.c (vectorizable_operation): Remove the + checks that the vectorization is worthwhile from the transformation + phase. + +2007-10-24 Ira Rosen <irar@il.ibm.com> + * tree-vect-analyze.c (vect_build_slp_tree): Return false if vectype cannot be determined for the scalar type. (vect_analyze_slp_instance): Likewise. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f650910..72bc446 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-10-24 Ira Rosen <irar@il.ibm.com> + + PR tree-optimization/33804 + * gcc.dg/vect/pr33804.c: New testcase. + 2007-10-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR forrtran/33849 diff --git a/gcc/testsuite/gcc.dg/vect/pr33804.c b/gcc/testsuite/gcc.dg/vect/pr33804.c new file mode 100644 index 0000000..959ac67 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr33804.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target vect_int } */ + +void f(unsigned char *s, unsigned char *d, int n) { + int i; + for (i = 0; i < n; i += 4) { + d[i + 0] += s[i + 0]; + d[i + 1] += s[i + 1]; + d[i + 2] += s[i + 2]; + d[i + 3] += s[i + 3]; + } +} + +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */ +/* { dg-final { cleanup-tree-dump "vect" } } */ + diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c index 81abd36..1f07605 100644 --- a/gcc/tree-vect-transform.c +++ b/gcc/tree-vect-transform.c @@ -3858,18 +3858,21 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt, { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "op not supported by target."); + /* Check only during analysis. */ if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD - || LOOP_VINFO_VECT_FACTOR (loop_vinfo) - < vect_min_worthwhile_factor (code)) + || (LOOP_VINFO_VECT_FACTOR (loop_vinfo) + < vect_min_worthwhile_factor (code) + && !vec_stmt)) return false; if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "proceeding using word mode."); } - /* Worthwhile without SIMD support? */ + /* Worthwhile without SIMD support? Check only during analysis. */ if (!VECTOR_MODE_P (TYPE_MODE (vectype)) && LOOP_VINFO_VECT_FACTOR (loop_vinfo) - < vect_min_worthwhile_factor (code)) + < vect_min_worthwhile_factor (code) + && !vec_stmt) { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "not worthwhile without SIMD support."); |