{
loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
imm_use_iterator imm_iter;
- tree lhs, lhs_type, bitsize, vec_bitsize;
+ tree lhs, lhs_type, bitsize;
tree vectype = (slp_node
? SLP_TREE_VECTYPE (slp_node)
: STMT_VINFO_VECTYPE (stmt_info));
lhs_type = TREE_TYPE (lhs);
bitsize = vector_element_bits_tree (vectype);
- vec_bitsize = TYPE_SIZE (vectype);
/* Get the vectorized lhs of STMT and the lane to use (counted in bits). */
tree vec_lhs, bitstart;
vec_lhs = gimple_get_lhs (vec_stmt);
/* Get the last lane in the vector. */
- bitstart = int_const_binop (MINUS_EXPR, vec_bitsize, bitsize);
+ bitstart = int_const_binop (MULT_EXPR, bitsize, bitsize_int (nunits - 1));
}
if (loop_vinfo)
{
gcc_checking_assert (VECTOR_TYPE_P (type));
if (VECTOR_BOOLEAN_TYPE_P (type))
- return vector_element_size (tree_to_poly_uint64 (TYPE_SIZE (type)),
- TYPE_VECTOR_SUBPARTS (type));
+ {
+ if (VECTOR_MODE_P (TYPE_MODE (type)))
+ return vector_element_size (tree_to_poly_uint64 (TYPE_SIZE (type)),
+ TYPE_VECTOR_SUBPARTS (type));
+ else
+ return 1;
+ }
return tree_to_uhwi (TYPE_SIZE (TREE_TYPE (type)));
}