diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-28 13:43:33 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-28 13:43:33 +0000 |
commit | bab85b65e545231656361b997a81fb8a44b266b4 (patch) | |
tree | 25b3da36ffb0e65619ba42780e8707ba0937daea /gcc/tree-vect-stmts.c | |
parent | 739016b56c81a76c269a10fec5844a608b97c09c (diff) | |
download | gcc-bab85b65e545231656361b997a81fb8a44b266b4.tar.gz |
2011-10-28 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 180613 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@180615 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r-- | gcc/tree-vect-stmts.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 4cd582dad89..dc81acb77e6 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -2318,6 +2318,7 @@ vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi, int nunits_in; int nunits_out; tree vectype_out; + tree op1_vectype; int ncopies; int j, i; VEC (tree, heap) *vec_oprnds0 = NULL, *vec_oprnds1 = NULL; @@ -2387,7 +2388,8 @@ vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi, return false; op1 = gimple_assign_rhs2 (stmt); - if (!vect_is_simple_use (op1, loop_vinfo, bb_vinfo, &def_stmt, &def, &dt[1])) + if (!vect_is_simple_use_1 (op1, loop_vinfo, bb_vinfo, &def_stmt, &def, + &dt[1], &op1_vectype)) { if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "use not simple."); @@ -2444,6 +2446,13 @@ vectorizable_shift (gimple stmt, gimple_stmt_iterator *gsi, optab = optab_for_tree_code (code, vectype, optab_vector); if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "vector/vector shift/rotate found."); + if (TYPE_MODE (op1_vectype) != TYPE_MODE (vectype)) + { + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "unusable type for last operand in" + " vector/vector shift/rotate."); + return false; + } } /* See if the machine has a vector shifted by scalar insn and if not then see if it has a vector shifted by vector insn. */ |