diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-22 07:18:37 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-22 07:18:37 +0000 |
commit | 47d30ca026ee42d0d6429de6482a6adc8c8333e6 (patch) | |
tree | 5307a01039deafd8a3fdd8686b0742e7996335d9 /gcc/tree-vect-stmts.c | |
parent | 29a84dc1fb3448b24d959158b796c0dcb95bf602 (diff) | |
download | gcc-47d30ca026ee42d0d6429de6482a6adc8c8333e6.tar.gz |
2012-10-22 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 192664 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@192665 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 70bcebbe99b..09c85967d43 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -6082,16 +6082,21 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size) When the component mode passes the above test simply use a type corresponding to that mode. The theory is that any use that would cause problems with this will disable vectorization anyway. */ - if (!SCALAR_FLOAT_TYPE_P (scalar_type) - && !INTEGRAL_TYPE_P (scalar_type) - && !POINTER_TYPE_P (scalar_type)) + else if (!SCALAR_FLOAT_TYPE_P (scalar_type) + && !INTEGRAL_TYPE_P (scalar_type) + && !POINTER_TYPE_P (scalar_type)) scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1); /* We can't build a vector type of elements with alignment bigger than their size. */ - if (nbytes < TYPE_ALIGN_UNIT (scalar_type)) + else if (nbytes < TYPE_ALIGN_UNIT (scalar_type)) scalar_type = lang_hooks.types.type_for_mode (inner_mode, 1); + /* If we felt back to using the mode fail if there was + no scalar type for it. */ + if (scalar_type == NULL_TREE) + return NULL_TREE; + /* If no size was supplied use the mode the target prefers. Otherwise lookup a vector mode of the specified size. */ if (size == 0) |