From 598b20248f3cde5d55297fe27659e27b2879ab52 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 26 May 2005 07:58:47 +0000 Subject: [PATCH] tree-vect-transform.c (vectorizable_operation): Try word_mode vectorization if UNITS_PER_WORD == UNITS_PER_SIMD_WORD... 2005-05-26 Paolo Bonzini * tree-vect-transform.c (vectorizable_operation): Try word_mode vectorization if UNITS_PER_WORD == UNITS_PER_SIMD_WORD, even if a vector mode is available. testsuite/ChangeLog: 2005-05-26 Paolo Bonzini * gcc.dg/vect/vect-7.c: Remove xfail for alpha. From-SVN: r100195 --- gcc/ChangeLog | 10 ++++++++++ gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/vect/vect-7.c | 4 ++-- gcc/tree-vect-transform.c | 7 ++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6d9e69f5c19..73e46756c09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-05-26 Paolo Bonzini + + * tree-vect-transform.c (vectorizable_operation): Try word_mode + vectorization if UNITS_PER_WORD == UNITS_PER_SIMD_WORD, even + if a vector mode is available. + 2005-05-25 Roger Sayle PR middle-end/21709 @@ -1044,6 +1050,10 @@ 2005-05-17 Paolo Bonzini + * tree-ssa-math-opts.c: New file. + +2005-05-17 Paolo Bonzini + * Makefile.in: Add tree-ssa-math-opts.c. * expr.c (expand_expr_real_1) : Never emit as a*(1/b). * fold-const.c (distribute_real_division): New. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e7747a3706a..ae03c426670 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-05-26 Paolo Bonzini + + * gcc.dg/vect/vect-7.c: Remove xfail for alpha. + 2005-05-26 Andreas Jaeger * gcc.dg/tree-ssa/ssa-pre-14.c (foo): Use correct type for strlen. diff --git a/gcc/testsuite/gcc.dg/vect/vect-7.c b/gcc/testsuite/gcc.dg/vect/vect-7.c index c753de8cd81..e359bbe2c56 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-7.c +++ b/gcc/testsuite/gcc.dg/vect/vect-7.c @@ -45,7 +45,7 @@ int main (void) return main1 (); } -/* Fails for targets that don't vectorize PLUS. */ -/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail alpha*-*-* } } } */ +/* Fails for 32-bit targets that don't vectorize PLUS. */ +/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */ /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */ /* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c index 17d65897cdb..5b5bf220fb9 100644 --- a/gcc/tree-vect-transform.c +++ b/gcc/tree-vect-transform.c @@ -815,7 +815,12 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) { if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) fprintf (vect_dump, "op not supported by target."); - return false; + if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD + || LOOP_VINFO_VECT_FACTOR (loop_vinfo) + < vect_min_worthwhile_factor (code)) + return false; + if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + fprintf (vect_dump, "proceeding using word mode."); } /* Worthwhile without SIMD support? */ -- 2.11.4.GIT