diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-24 14:24:36 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-24 14:24:36 +0000 |
commit | 6960a79470014c20f1815f3340855c2fe17ceb7e (patch) | |
tree | 7e7f20eb45a94a6b7cee99303e10a1078d06bc27 /gcc/tree-vect-loop.c | |
parent | c1aa88178a22655e6bfa1fbb9e7ff7a9dfae9a19 (diff) | |
download | gcc-6960a79470014c20f1815f3340855c2fe17ceb7e.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180384 138bc75d-0d04-0410-961f-82ee72b054a4
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 3ef407e7121..a04099fc06a 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 |