optab_vector);
if (!optab
- || (optab->handlers[(int) vec_mode].insn_code
- == CODE_FOR_nothing))
+ || optab_handler (optab, vec_mode) == CODE_FOR_nothing)
{
/* No vector/vector shift, try for a vector/scalar shift. */
optab = optab_for_tree_code (rhs_code, vectype,
fprintf (vect_dump, "Build SLP failed: no optab.");
return false;
}
- icode = (int) optab->handlers[(int) vec_mode].insn_code;
+ icode = (int) optab_handler (optab, vec_mode);
if (icode == CODE_FOR_nothing)
{
if (vect_print_dump_info (REPORT_SLP))
if (first_load == stmt)
{
first_dr = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt));
- if (vect_supportable_dr_alignment (first_dr)
+ if (vect_supportable_dr_alignment (first_dr, false)
== dr_unaligned_unsupported)
{
if (vect_print_dump_info (REPORT_SLP))
if (permutation)
{
VEC_safe_push (slp_tree, heap, *loads, *node);
- *inside_cost += TARG_VEC_PERMUTE_COST * group_size;
+ *inside_cost
+ += targetm.vectorize.builtin_vectorization_cost (vec_perm, NULL, 0)
+ * group_size;
}
return true;
break;
case MULT_EXPR:
- case BIT_AND_EXPR:
if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (op)))
neutral_op = build_real (TREE_TYPE (op), dconst1);
else
break;
+ case BIT_AND_EXPR:
+ neutral_op = build_int_cst (TREE_TYPE (op), -1);
+ break;
+
default:
neutral_op = NULL;
}
stmt_vec_info next_stmt_info;
int i, stride;
tree first_vec, second_vec, data_ref;
- VEC (tree, heap) *params = NULL;
stride = SLP_TREE_NUMBER_OF_VEC_STMTS (node) / ncopies;
first_vec = VEC_index (tree, dr_chain, first_vec_indx);
second_vec = VEC_index (tree, dr_chain, second_vec_indx);
- /* Build argument list for the vectorized call. */
- VEC_free (tree, heap, params);
- params = VEC_alloc (tree, heap, 3);
- VEC_quick_push (tree, params, first_vec);
- VEC_quick_push (tree, params, second_vec);
- VEC_quick_push (tree, params, mask);
-
/* Generate the permute statement. */
- perm_stmt = gimple_build_call_vec (builtin_decl, params);
+ perm_stmt = gimple_build_call (builtin_decl,
+ 3, first_vec, second_vec, mask);
data_ref = make_ssa_name (perm_dest, perm_stmt);
gimple_call_set_lhs (perm_stmt, data_ref);
vect_finish_stmt_generation (stmt, perm_stmt, gsi);