Allow non-overflow ops in reductions
authorTom de Vries <tom@codesourcery.com>
Sat, 1 Aug 2015 08:29:29 +0000 (08:29 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Sat, 1 Aug 2015 08:29:29 +0000 (08:29 +0000)
commit805134b9170b4ac563189c24b35fa4dc09853569
tree0353ecb04dbb4fcc695e28eb9c4d13e340815664
parentfaf4ac3218fdf7d316d7bd8da121029ba60f0099
Allow non-overflow ops in reductions

2015-08-01  Tom de Vries  <tom@codesourcery.com>

* tree.c (operation_can_overflow, operation_no_trapping_overflow): New
function.
* tree.h (operation_can_overflow, operation_no_trapping_overflow):
Declare.
* tree-vect-loop.c (vect_is_simple_reduction_1): Use
operation_no_trapping_overflow.  Allow non-overflow operations.
* graphite-sese-to-poly.c (is_reduction_operation_p): Allow non-overflow
operations.

* gcc.dg/autopar/reduc-2char.c (init_arrays): Mark with attribute
optimize ("-ftree-parallelize-loops=0").
Add successful scans for 2 detected reductions.  Add xfail scans for 3
detected reductions.
* gcc.dg/autopar/reduc-2short.c: Same.
* gcc.dg/autopar/reduc-8.c (init_arrays): Mark with attribute
optimize ("-ftree-parallelize-loops=0").  Add successful scans for 2
detected reductions.
* gcc.dg/vect/trapv-vect-reduc-4.c: Update scan to match vectorized min
and max reductions.

From-SVN: r226463
gcc/ChangeLog
gcc/graphite-sese-to-poly.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/autopar/reduc-2char.c
gcc/testsuite/gcc.dg/autopar/reduc-2short.c
gcc/testsuite/gcc.dg/autopar/reduc-8.c
gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
gcc/tree-vect-loop.c
gcc/tree.c
gcc/tree.h