diff options
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 270 |
1 files changed, 109 insertions, 161 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index d97008f7014..d5effab186b 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -439,8 +439,8 @@ vect_recog_dot_prod_pattern (vec<gimple> *stmts, tree *type_in, /* Pattern detected. Create a stmt to be used to replace the pattern: */ var = vect_recog_temp_ssa_var (type, NULL); - pattern_stmt = gimple_build_assign_with_ops (DOT_PROD_EXPR, var, - oprnd00, oprnd01, oprnd1); + pattern_stmt = gimple_build_assign (var, DOT_PROD_EXPR, + oprnd00, oprnd01, oprnd1); if (dump_enabled_p ()) { @@ -673,8 +673,8 @@ vect_recog_sad_pattern (vec<gimple> *stmts, tree *type_in, /* Pattern detected. Create a stmt to be used to replace the pattern: */ tree var = vect_recog_temp_ssa_var (sum_type, NULL); - gimple pattern_stmt = gimple_build_assign_with_ops - (SAD_EXPR, var, sad_oprnd0, sad_oprnd1, plus_oprnd1); + gimple pattern_stmt = gimple_build_assign (var, SAD_EXPR, sad_oprnd0, + sad_oprnd1, plus_oprnd1); if (dump_enabled_p ()) { @@ -760,7 +760,7 @@ vect_handle_widen_op_by_const (gimple stmt, enum tree_code code, /* Create a_T = (NEW_TYPE) a_t; */ *oprnd = gimple_assign_rhs1 (def_stmt); new_oprnd = make_ssa_name (new_type); - new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, *oprnd); + new_stmt = gimple_build_assign (new_oprnd, NOP_EXPR, *oprnd); STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt)) = new_stmt; stmts->safe_push (def_stmt); *oprnd = new_oprnd; @@ -933,8 +933,7 @@ vect_recog_widen_mult_pattern (vec<gimple> *stmts, tree old_oprnd = gimple_assign_rhs1 (def_stmt); tree new_oprnd = make_ssa_name (half_type0); - new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, - old_oprnd); + new_stmt = gimple_build_assign (new_oprnd, NOP_EXPR, old_oprnd); *oprnd = new_oprnd; } @@ -999,8 +998,7 @@ vect_recog_widen_mult_pattern (vec<gimple> *stmts, /* Pattern supported. Create a stmt to be used to replace the pattern: */ var = vect_recog_temp_ssa_var (itype, NULL); - pattern_stmt = gimple_build_assign_with_ops (WIDEN_MULT_EXPR, var, oprnd0, - oprnd1); + pattern_stmt = gimple_build_assign (var, WIDEN_MULT_EXPR, oprnd0, oprnd1); stmt_vec_info stmt_vinfo = vinfo_for_stmt (last_stmt); loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo); @@ -1028,10 +1026,9 @@ vect_recog_widen_mult_pattern (vec<gimple> *stmts, = new_stmt_vec_info (pattern_stmt, loop_vinfo, bb_vinfo); set_vinfo_for_stmt (pattern_stmt, pattern_stmt_info); STMT_VINFO_VECTYPE (pattern_stmt_info) = vecitype; - pattern_stmt - = gimple_build_assign_with_ops (NOP_EXPR, - vect_recog_temp_ssa_var (type, NULL), - gimple_assign_lhs (pattern_stmt)); + pattern_stmt = gimple_build_assign (vect_recog_temp_ssa_var (type, NULL), + NOP_EXPR, + gimple_assign_lhs (pattern_stmt)); } if (dump_enabled_p ()) @@ -1115,7 +1112,7 @@ vect_recog_pow_pattern (vec<gimple> *stmts, tree *type_in, *type_in = TREE_TYPE (base); var = vect_recog_temp_ssa_var (TREE_TYPE (base), NULL); - stmt = gimple_build_assign_with_ops (MULT_EXPR, var, base, base); + stmt = gimple_build_assign (var, MULT_EXPR, base, base); return stmt; } @@ -1244,8 +1241,7 @@ vect_recog_widen_sum_pattern (vec<gimple> *stmts, tree *type_in, /* Pattern detected. Create a stmt to be used to replace the pattern: */ var = vect_recog_temp_ssa_var (type, NULL); - pattern_stmt = gimple_build_assign_with_ops (WIDEN_SUM_EXPR, var, - oprnd0, oprnd1); + pattern_stmt = gimple_build_assign (var, WIDEN_SUM_EXPR, oprnd0, oprnd1); if (dump_enabled_p ()) { @@ -1440,8 +1436,7 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type, /* Create NEW_OPRND = (INTERM_TYPE) OPRND. */ oprnd = gimple_assign_rhs1 (def_stmt); new_oprnd = make_ssa_name (interm_type); - new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, - oprnd); + new_stmt = gimple_build_assign (new_oprnd, NOP_EXPR, oprnd); STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt)) = new_stmt; stmts->safe_push (def_stmt); oprnd = new_oprnd; @@ -1459,8 +1454,7 @@ vect_operation_fits_smaller_type (gimple stmt, tree def, tree *new_type, { /* Create a type conversion HALF_TYPE->INTERM_TYPE. */ new_oprnd = make_ssa_name (interm_type); - new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, - oprnd); + new_stmt = gimple_build_assign (new_oprnd, NOP_EXPR, oprnd); oprnd = new_oprnd; *new_def_stmt = new_stmt; } @@ -1548,8 +1542,7 @@ vect_recog_over_widening_pattern (vec<gimple> *stmts, var = vect_recog_temp_ssa_var (new_type, NULL); pattern_stmt - = gimple_build_assign_with_ops (gimple_assign_rhs_code (stmt), var, - op0, op1); + = gimple_build_assign (var, gimple_assign_rhs_code (stmt), op0, op1); STMT_VINFO_RELATED_STMT (vinfo_for_stmt (stmt)) = pattern_stmt; new_pattern_def_seq (vinfo_for_stmt (stmt), new_def_stmt); @@ -1591,8 +1584,7 @@ vect_recog_over_widening_pattern (vec<gimple> *stmts, { /* Create NEW_TYPE->USE_TYPE conversion. */ new_oprnd = make_ssa_name (use_type); - pattern_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, - var); + pattern_stmt = gimple_build_assign (new_oprnd, NOP_EXPR, var); STMT_VINFO_RELATED_STMT (vinfo_for_stmt (use_stmt)) = pattern_stmt; *type_in = get_vectype_for_scalar_type (new_type); @@ -1781,7 +1773,7 @@ vect_recog_widen_shift_pattern (vec<gimple> *stmts, /* Pattern supported. Create a stmt to be used to replace the pattern. */ var = vect_recog_temp_ssa_var (type, NULL); pattern_stmt = - gimple_build_assign_with_ops (WIDEN_LSHIFT_EXPR, var, oprnd0, oprnd1); + gimple_build_assign (var, WIDEN_LSHIFT_EXPR, oprnd0, oprnd1); if (dump_enabled_p ()) dump_gimple_stmt_loc (MSG_NOTE, vect_location, TDF_SLIM, pattern_stmt, 0); @@ -1944,7 +1936,7 @@ vect_recog_rotate_pattern (vec<gimple> *stmts, tree *type_in, tree *type_out) if (def == NULL_TREE) { def = vect_recog_temp_ssa_var (type, NULL); - def_stmt = gimple_build_assign_with_ops (NOP_EXPR, def, oprnd1); + def_stmt = gimple_build_assign (def, NOP_EXPR, oprnd1); if (ext_def) { basic_block new_bb @@ -1974,7 +1966,7 @@ vect_recog_rotate_pattern (vec<gimple> *stmts, tree *type_in, tree *type_out) if (vecstype == NULL_TREE) return NULL; def2 = vect_recog_temp_ssa_var (stype, NULL); - def_stmt = gimple_build_assign_with_ops (NEGATE_EXPR, def2, def); + def_stmt = gimple_build_assign (def2, NEGATE_EXPR, def); if (ext_def) { basic_block new_bb @@ -1992,9 +1984,8 @@ vect_recog_rotate_pattern (vec<gimple> *stmts, tree *type_in, tree *type_out) def2 = vect_recog_temp_ssa_var (stype, NULL); tree mask = build_int_cst (stype, GET_MODE_PRECISION (TYPE_MODE (stype)) - 1); - def_stmt = gimple_build_assign_with_ops (BIT_AND_EXPR, def2, - gimple_assign_lhs (def_stmt), - mask); + def_stmt = gimple_build_assign (def2, BIT_AND_EXPR, + gimple_assign_lhs (def_stmt), mask); if (ext_def) { basic_block new_bb @@ -2011,15 +2002,15 @@ vect_recog_rotate_pattern (vec<gimple> *stmts, tree *type_in, tree *type_out) } var1 = vect_recog_temp_ssa_var (type, NULL); - def_stmt = gimple_build_assign_with_ops (rhs_code == LROTATE_EXPR - ? LSHIFT_EXPR : RSHIFT_EXPR, - var1, oprnd0, def); + def_stmt = gimple_build_assign (var1, rhs_code == LROTATE_EXPR + ? LSHIFT_EXPR : RSHIFT_EXPR, + oprnd0, def); append_pattern_def_seq (stmt_vinfo, def_stmt); var2 = vect_recog_temp_ssa_var (type, NULL); - def_stmt = gimple_build_assign_with_ops (rhs_code == LROTATE_EXPR - ? RSHIFT_EXPR : LSHIFT_EXPR, - var2, oprnd0, def2); + def_stmt = gimple_build_assign (var2, rhs_code == LROTATE_EXPR + ? RSHIFT_EXPR : LSHIFT_EXPR, + oprnd0, def2); append_pattern_def_seq (stmt_vinfo, def_stmt); /* Pattern detected. */ @@ -2029,7 +2020,7 @@ vect_recog_rotate_pattern (vec<gimple> *stmts, tree *type_in, tree *type_out) /* Pattern supported. Create a stmt to be used to replace the pattern. */ var = vect_recog_temp_ssa_var (type, NULL); - pattern_stmt = gimple_build_assign_with_ops (BIT_IOR_EXPR, var, var1, var2); + pattern_stmt = gimple_build_assign (var, BIT_IOR_EXPR, var1, var2); if (dump_enabled_p ()) dump_gimple_stmt_loc (MSG_NOTE, vect_location, TDF_SLIM, pattern_stmt, 0); @@ -2147,7 +2138,7 @@ vect_recog_vector_vector_shift_pattern (vec<gimple> *stmts, if (def == NULL_TREE) { def = vect_recog_temp_ssa_var (TREE_TYPE (oprnd0), NULL); - def_stmt = gimple_build_assign_with_ops (NOP_EXPR, def, oprnd1); + def_stmt = gimple_build_assign (def, NOP_EXPR, oprnd1); new_pattern_def_seq (stmt_vinfo, def_stmt); } @@ -2158,7 +2149,7 @@ vect_recog_vector_vector_shift_pattern (vec<gimple> *stmts, /* Pattern supported. Create a stmt to be used to replace the pattern. */ var = vect_recog_temp_ssa_var (TREE_TYPE (oprnd0), NULL); - pattern_stmt = gimple_build_assign_with_ops (rhs_code, var, oprnd0, def); + pattern_stmt = gimple_build_assign (var, rhs_code, oprnd0, def); if (dump_enabled_p ()) dump_gimple_stmt_loc (MSG_NOTE, vect_location, TDF_SLIM, pattern_stmt, 0); @@ -2281,25 +2272,21 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, tree var = vect_recog_temp_ssa_var (itype, NULL); tree shift; def_stmt - = gimple_build_assign_with_ops (COND_EXPR, var, cond, - fold_build2 (MINUS_EXPR, itype, - oprnd1, - build_int_cst (itype, - 1)), - build_int_cst (itype, 0)); + = gimple_build_assign (var, COND_EXPR, cond, + fold_build2 (MINUS_EXPR, itype, oprnd1, + build_int_cst (itype, 1)), + build_int_cst (itype, 0)); new_pattern_def_seq (stmt_vinfo, def_stmt); var = vect_recog_temp_ssa_var (itype, NULL); def_stmt - = gimple_build_assign_with_ops (PLUS_EXPR, var, oprnd0, - gimple_assign_lhs (def_stmt)); + = gimple_build_assign (var, PLUS_EXPR, oprnd0, + gimple_assign_lhs (def_stmt)); append_pattern_def_seq (stmt_vinfo, def_stmt); shift = build_int_cst (itype, tree_log2 (oprnd1)); pattern_stmt - = gimple_build_assign_with_ops (RSHIFT_EXPR, - vect_recog_temp_ssa_var (itype, - NULL), - var, shift); + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + RSHIFT_EXPR, var, shift); } else { @@ -2308,10 +2295,9 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, if (compare_tree_int (oprnd1, 2) == 0) { signmask = vect_recog_temp_ssa_var (itype, NULL); - def_stmt - = gimple_build_assign_with_ops (COND_EXPR, signmask, cond, - build_int_cst (itype, 1), - build_int_cst (itype, 0)); + def_stmt = gimple_build_assign (signmask, COND_EXPR, cond, + build_int_cst (itype, 1), + build_int_cst (itype, 0)); append_pattern_def_seq (stmt_vinfo, def_stmt); } else @@ -2324,20 +2310,18 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, - tree_log2 (oprnd1)); tree var = vect_recog_temp_ssa_var (utype, NULL); - def_stmt - = gimple_build_assign_with_ops (COND_EXPR, var, cond, - build_int_cst (utype, -1), - build_int_cst (utype, 0)); + def_stmt = gimple_build_assign (var, COND_EXPR, cond, + build_int_cst (utype, -1), + build_int_cst (utype, 0)); def_stmt_vinfo = new_stmt_vec_info (def_stmt, loop_vinfo, bb_vinfo); set_vinfo_for_stmt (def_stmt, def_stmt_vinfo); STMT_VINFO_VECTYPE (def_stmt_vinfo) = vecutype; append_pattern_def_seq (stmt_vinfo, def_stmt); var = vect_recog_temp_ssa_var (utype, NULL); - def_stmt - = gimple_build_assign_with_ops (RSHIFT_EXPR, var, - gimple_assign_lhs (def_stmt), - shift); + def_stmt = gimple_build_assign (var, RSHIFT_EXPR, + gimple_assign_lhs (def_stmt), + shift); def_stmt_vinfo = new_stmt_vec_info (def_stmt, loop_vinfo, bb_vinfo); set_vinfo_for_stmt (def_stmt, def_stmt_vinfo); @@ -2345,32 +2329,24 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, append_pattern_def_seq (stmt_vinfo, def_stmt); signmask = vect_recog_temp_ssa_var (itype, NULL); def_stmt - = gimple_build_assign_with_ops (NOP_EXPR, signmask, var); + = gimple_build_assign (signmask, NOP_EXPR, var); append_pattern_def_seq (stmt_vinfo, def_stmt); } def_stmt - = gimple_build_assign_with_ops (PLUS_EXPR, - vect_recog_temp_ssa_var (itype, - NULL), - oprnd0, signmask); + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + PLUS_EXPR, oprnd0, signmask); append_pattern_def_seq (stmt_vinfo, def_stmt); def_stmt - = gimple_build_assign_with_ops (BIT_AND_EXPR, - vect_recog_temp_ssa_var (itype, - NULL), - gimple_assign_lhs (def_stmt), - fold_build2 (MINUS_EXPR, itype, - oprnd1, - build_int_cst (itype, - 1))); + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + BIT_AND_EXPR, gimple_assign_lhs (def_stmt), + fold_build2 (MINUS_EXPR, itype, oprnd1, + build_int_cst (itype, 1))); append_pattern_def_seq (stmt_vinfo, def_stmt); pattern_stmt - = gimple_build_assign_with_ops (MINUS_EXPR, - vect_recog_temp_ssa_var (itype, - NULL), - gimple_assign_lhs (def_stmt), - signmask); + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + MINUS_EXPR, gimple_assign_lhs (def_stmt), + signmask); } if (dump_enabled_p ()) @@ -2432,25 +2408,23 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, t4 = t1 + t3; q = t4 >> (post_shift - 1); */ t1 = vect_recog_temp_ssa_var (itype, NULL); - def_stmt - = gimple_build_assign_with_ops (MULT_HIGHPART_EXPR, t1, oprnd0, - build_int_cst (itype, ml)); + def_stmt = gimple_build_assign (t1, MULT_HIGHPART_EXPR, oprnd0, + build_int_cst (itype, ml)); append_pattern_def_seq (stmt_vinfo, def_stmt); t2 = vect_recog_temp_ssa_var (itype, NULL); def_stmt - = gimple_build_assign_with_ops (MINUS_EXPR, t2, oprnd0, t1); + = gimple_build_assign (t2, MINUS_EXPR, oprnd0, t1); append_pattern_def_seq (stmt_vinfo, def_stmt); t3 = vect_recog_temp_ssa_var (itype, NULL); def_stmt - = gimple_build_assign_with_ops (RSHIFT_EXPR, t3, t2, - integer_one_node); + = gimple_build_assign (t3, RSHIFT_EXPR, t2, integer_one_node); append_pattern_def_seq (stmt_vinfo, def_stmt); t4 = vect_recog_temp_ssa_var (itype, NULL); def_stmt - = gimple_build_assign_with_ops (PLUS_EXPR, t4, t1, t3); + = gimple_build_assign (t4, PLUS_EXPR, t1, t3); if (post_shift != 1) { @@ -2458,10 +2432,8 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, q = vect_recog_temp_ssa_var (itype, NULL); pattern_stmt - = gimple_build_assign_with_ops (RSHIFT_EXPR, q, t4, - build_int_cst (itype, - post_shift - - 1)); + = gimple_build_assign (q, RSHIFT_EXPR, t4, + build_int_cst (itype, post_shift - 1)); } else { @@ -2481,18 +2453,16 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, { t1 = vect_recog_temp_ssa_var (itype, NULL); def_stmt - = gimple_build_assign_with_ops (RSHIFT_EXPR, t1, oprnd0, - build_int_cst (NULL, - pre_shift)); + = gimple_build_assign (t1, RSHIFT_EXPR, oprnd0, + build_int_cst (NULL, pre_shift)); append_pattern_def_seq (stmt_vinfo, def_stmt); } else t1 = oprnd0; t2 = vect_recog_temp_ssa_var (itype, NULL); - def_stmt - = gimple_build_assign_with_ops (MULT_HIGHPART_EXPR, t2, t1, - build_int_cst (itype, ml)); + def_stmt = gimple_build_assign (t2, MULT_HIGHPART_EXPR, t1, + build_int_cst (itype, ml)); if (post_shift) { @@ -2500,9 +2470,8 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, q = vect_recog_temp_ssa_var (itype, NULL); def_stmt - = gimple_build_assign_with_ops (RSHIFT_EXPR, q, t2, - build_int_cst (itype, - post_shift)); + = gimple_build_assign (q, RSHIFT_EXPR, t2, + build_int_cst (itype, post_shift)); } else q = t2; @@ -2552,17 +2521,15 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, /* t1 = oprnd0 h* ml; */ t1 = vect_recog_temp_ssa_var (itype, NULL); - def_stmt - = gimple_build_assign_with_ops (MULT_HIGHPART_EXPR, t1, oprnd0, - build_int_cst (itype, ml)); + def_stmt = gimple_build_assign (t1, MULT_HIGHPART_EXPR, oprnd0, + build_int_cst (itype, ml)); if (add) { /* t2 = t1 + oprnd0; */ append_pattern_def_seq (stmt_vinfo, def_stmt); t2 = vect_recog_temp_ssa_var (itype, NULL); - def_stmt - = gimple_build_assign_with_ops (PLUS_EXPR, t2, t1, oprnd0); + def_stmt = gimple_build_assign (t2, PLUS_EXPR, t1, oprnd0); } else t2 = t1; @@ -2572,9 +2539,8 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, /* t3 = t2 >> post_shift; */ append_pattern_def_seq (stmt_vinfo, def_stmt); t3 = vect_recog_temp_ssa_var (itype, NULL); - def_stmt - = gimple_build_assign_with_ops (RSHIFT_EXPR, t3, t2, - build_int_cst (itype, post_shift)); + def_stmt = gimple_build_assign (t3, RSHIFT_EXPR, t2, + build_int_cst (itype, post_shift)); } else t3 = t2; @@ -2605,20 +2571,17 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, append_pattern_def_seq (stmt_vinfo, def_stmt); t4 = vect_recog_temp_ssa_var (itype, NULL); if (msb != 1) - def_stmt - = gimple_build_assign_with_ops (INTEGER_CST, - t4, build_int_cst (itype, msb)); + def_stmt = gimple_build_assign (t4, INTEGER_CST, + build_int_cst (itype, msb)); else - def_stmt - = gimple_build_assign_with_ops (RSHIFT_EXPR, t4, oprnd0, - build_int_cst (itype, prec - 1)); + def_stmt = gimple_build_assign (t4, RSHIFT_EXPR, oprnd0, + build_int_cst (itype, prec - 1)); append_pattern_def_seq (stmt_vinfo, def_stmt); /* q = t3 - t4; or q = t4 - t3; */ q = vect_recog_temp_ssa_var (itype, NULL); - pattern_stmt - = gimple_build_assign_with_ops (MINUS_EXPR, q, d < 0 ? t4 : t3, - d < 0 ? t3 : t4); + pattern_stmt = gimple_build_assign (q, MINUS_EXPR, d < 0 ? t4 : t3, + d < 0 ? t3 : t4); } } @@ -2632,13 +2595,11 @@ vect_recog_divmod_pattern (vec<gimple> *stmts, append_pattern_def_seq (stmt_vinfo, pattern_stmt); t1 = vect_recog_temp_ssa_var (itype, NULL); - def_stmt - = gimple_build_assign_with_ops (MULT_EXPR, t1, q, oprnd1); + def_stmt = gimple_build_assign (t1, MULT_EXPR, q, oprnd1); append_pattern_def_seq (stmt_vinfo, def_stmt); r = vect_recog_temp_ssa_var (itype, NULL); - pattern_stmt - = gimple_build_assign_with_ops (MINUS_EXPR, r, oprnd0, t1); + pattern_stmt = gimple_build_assign (r, MINUS_EXPR, oprnd0, t1); } /* Pattern detected. */ @@ -2793,16 +2754,12 @@ vect_recog_mixed_size_cond_pattern (vec<gimple> *stmts, tree *type_in, return NULL; } - def_stmt - = gimple_build_assign_with_ops (COND_EXPR, - vect_recog_temp_ssa_var (itype, NULL), - unshare_expr (cond_expr), - fold_convert (itype, then_clause), - fold_convert (itype, else_clause)); - pattern_stmt - = gimple_build_assign_with_ops (NOP_EXPR, - vect_recog_temp_ssa_var (type, NULL), - gimple_assign_lhs (def_stmt)); + def_stmt = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + COND_EXPR, unshare_expr (cond_expr), + fold_convert (itype, then_clause), + fold_convert (itype, else_clause)); + pattern_stmt = gimple_build_assign (vect_recog_temp_ssa_var (type, NULL), + NOP_EXPR, gimple_assign_lhs (def_stmt)); new_pattern_def_seq (stmt_vinfo, def_stmt); def_stmt_info = new_stmt_vec_info (def_stmt, loop_vinfo, bb_vinfo); @@ -2913,10 +2870,8 @@ adjust_bool_pattern_cast (tree type, tree var) gcc_assert (!STMT_VINFO_PATTERN_DEF_SEQ (stmt_vinfo)); pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_vinfo); new_pattern_def_seq (stmt_vinfo, pattern_stmt); - cast_stmt - = gimple_build_assign_with_ops (NOP_EXPR, - vect_recog_temp_ssa_var (type, NULL), - gimple_assign_lhs (pattern_stmt)); + cast_stmt = gimple_build_assign (vect_recog_temp_ssa_var (type, NULL), + NOP_EXPR, gimple_assign_lhs (pattern_stmt)); STMT_VINFO_RELATED_STMT (stmt_vinfo) = cast_stmt; return gimple_assign_lhs (cast_stmt); } @@ -2951,18 +2906,16 @@ adjust_bool_pattern (tree var, tree out_type, tree trueval, irhs1 = adjust_bool_pattern (rhs1, out_type, NULL_TREE, stmts); itype = TREE_TYPE (irhs1); pattern_stmt - = gimple_build_assign_with_ops (SSA_NAME, - vect_recog_temp_ssa_var (itype, NULL), - irhs1); + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + SSA_NAME, irhs1); break; case BIT_NOT_EXPR: irhs1 = adjust_bool_pattern (rhs1, out_type, NULL_TREE, stmts); itype = TREE_TYPE (irhs1); pattern_stmt - = gimple_build_assign_with_ops (BIT_XOR_EXPR, - vect_recog_temp_ssa_var (itype, NULL), - irhs1, build_int_cst (itype, 1)); + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + BIT_XOR_EXPR, irhs1, build_int_cst (itype, 1)); break; case BIT_AND_EXPR: @@ -3073,9 +3026,8 @@ adjust_bool_pattern (tree var, tree out_type, tree trueval, } itype = TREE_TYPE (irhs1); pattern_stmt - = gimple_build_assign_with_ops (rhs_code, - vect_recog_temp_ssa_var (itype, NULL), - irhs1, irhs2); + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + rhs_code, irhs1, irhs2); break; default: @@ -3098,10 +3050,9 @@ adjust_bool_pattern (tree var, tree out_type, tree trueval, gcc_checking_assert (useless_type_conversion_p (itype, TREE_TYPE (trueval))); pattern_stmt - = gimple_build_assign_with_ops (COND_EXPR, - vect_recog_temp_ssa_var (itype, NULL), - cond_expr, trueval, - build_int_cst (itype, 0)); + = gimple_build_assign (vect_recog_temp_ssa_var (itype, NULL), + COND_EXPR, cond_expr, trueval, + build_int_cst (itype, 0)); break; } @@ -3200,11 +3151,10 @@ vect_recog_bool_pattern (vec<gimple> *stmts, tree *type_in, rhs = adjust_bool_pattern (var, TREE_TYPE (lhs), NULL_TREE, stmts); lhs = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL); if (useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs))) - pattern_stmt - = gimple_build_assign_with_ops (SSA_NAME, lhs, rhs); + pattern_stmt = gimple_build_assign (lhs, SSA_NAME, rhs); else pattern_stmt - = gimple_build_assign_with_ops (NOP_EXPR, lhs, rhs); + = gimple_build_assign (lhs, NOP_EXPR, rhs); *type_out = vectype; *type_in = vectype; stmts->safe_push (last_stmt); @@ -3239,11 +3189,11 @@ vect_recog_bool_pattern (vec<gimple> *stmts, tree *type_in, rhs = adjust_bool_pattern (var, type, NULL_TREE, stmts); lhs = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL); pattern_stmt - = gimple_build_assign_with_ops (COND_EXPR, lhs, - build2 (NE_EXPR, boolean_type_node, - rhs, build_int_cst (type, 0)), - gimple_assign_rhs2 (last_stmt), - gimple_assign_rhs3 (last_stmt)); + = gimple_build_assign (lhs, COND_EXPR, + build2 (NE_EXPR, boolean_type_node, + rhs, build_int_cst (type, 0)), + gimple_assign_rhs2 (last_stmt), + gimple_assign_rhs3 (last_stmt)); *type_out = vectype; *type_in = vectype; stmts->safe_push (last_stmt); @@ -3269,13 +3219,11 @@ vect_recog_bool_pattern (vec<gimple> *stmts, tree *type_in, if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs))) { tree rhs2 = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL); - gimple cast_stmt - = gimple_build_assign_with_ops (NOP_EXPR, rhs2, rhs); + gimple cast_stmt = gimple_build_assign (rhs2, NOP_EXPR, rhs); new_pattern_def_seq (stmt_vinfo, cast_stmt); rhs = rhs2; } - pattern_stmt - = gimple_build_assign_with_ops (SSA_NAME, lhs, rhs); + pattern_stmt = gimple_build_assign (lhs, SSA_NAME, rhs); pattern_stmt_info = new_stmt_vec_info (pattern_stmt, loop_vinfo, bb_vinfo); set_vinfo_for_stmt (pattern_stmt, pattern_stmt_info); |