diff options
author | Richard Guenther <rguenther@suse.de> | 2011-10-24 14:24:36 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-10-24 14:24:36 +0000 |
commit | 7b7b1813daa8b65c1528025e3fd9e459690b72c4 (patch) | |
tree | 7e7f20eb45a94a6b7cee99303e10a1078d06bc27 /gcc/tree-vect-loop.c | |
parent | 695074beca1441d103d7da374ae4eb6b8f3b4be5 (diff) | |
download | gcc-7b7b1813daa8b65c1528025e3fd9e459690b72c4.zip gcc-7b7b1813daa8b65c1528025e3fd9e459690b72c4.tar.gz gcc-7b7b1813daa8b65c1528025e3fd9e459690b72c4.tar.bz2 |
tree-vect-stmts.c (vect_get_vec_def_for_operand): Convert constants to vector element type.
2011-10-24 Richard Guenther <rguenther@suse.de>
* tree-vect-stmts.c (vect_get_vec_def_for_operand): Convert constants
to vector element type.
(vectorizable_assignment): Bail out for non-mode-precision operations.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_type_demotion): Likewise.
(vectorizable_type_promotion): Likewise.
(vectorizable_store): Handle non-mode-precision stores.
(vectorizable_load): Handle non-mode-precision loads.
(get_vectype_for_scalar_type_and_size): Return a vector type
for non-mode-precision integers.
* tree-vect-loop.c (vectorizable_reduction): Bail out for
non-mode-precision reductions.
* gcc.dg/vect/vect-bool-1.c: New testcase.
From-SVN: r180384
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 3ef407e..a04099f 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -4422,6 +4422,11 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, && !SCALAR_FLOAT_TYPE_P (scalar_type)) return false; + /* Do not try to vectorize bit-precision reductions. */ + if ((TYPE_PRECISION (scalar_type) + != GET_MODE_PRECISION (TYPE_MODE (scalar_type)))) + return false; + /* All uses but the last are expected to be defined in the loop. The last use is the reduction variable. In case of nested cycle this assumption is not true: we use reduc_index to record the index of the |