We failed to handle the case of a scalar shift operand in do_binop. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard. 2010-10-27 Richard Guenther <rguent...@suse.de> PR middle-end/50731 * tree-vect-generic.c (do_binop): Handle scalar operands. Index: gcc/tree-vect-generic.c =================================================================== *** gcc/tree-vect-generic.c (revision 180561) --- gcc/tree-vect-generic.c (working copy) *************** static tree *** 125,132 **** do_binop (gimple_stmt_iterator *gsi, tree inner_type, tree a, tree b, tree bitpos, tree bitsize, enum tree_code code) { ! a = tree_vec_extract (gsi, inner_type, a, bitsize, bitpos); ! b = tree_vec_extract (gsi, inner_type, b, bitsize, bitpos); return gimplify_build2 (gsi, code, inner_type, a, b); } --- 125,134 ---- do_binop (gimple_stmt_iterator *gsi, tree inner_type, tree a, tree b, tree bitpos, tree bitsize, enum tree_code code) { ! if (TREE_CODE (TREE_TYPE (a)) == VECTOR_TYPE) ! a = tree_vec_extract (gsi, inner_type, a, bitsize, bitpos); ! if (TREE_CODE (TREE_TYPE (b)) == VECTOR_TYPE) ! b = tree_vec_extract (gsi, inner_type, b, bitsize, bitpos); return gimplify_build2 (gsi, code, inner_type, a, b); }