On Thu, 6 Oct 2011, Jakub Jelinek wrote: > Hi! > > If the second argument of gimple_build_assign_with_ops is an SSA_NAME, > gimple_build_assign_with_ops_stat calls gimple_assign_set_lhs > which does > if (lhs && TREE_CODE (lhs) == SSA_NAME) > SSA_NAME_DEF_STMT (lhs) = gs; > so the SSA_NAME_DEF_STMT assignments in tree-vect-patterns.c aren't needed. > Cleaned up thusly, bootstrapped/regtested on x86_64-linux and i686-linux, > ok for trunk?
Ok. Thanks, Richard. > 2011-10-06 Jakub Jelinek <ja...@redhat.com> > > * tree-vect-patterns.c (vect_handle_widen_mult_by_const): For lhs > don't set SSA_NAME_DEF_STMT that has been already set by > gimple_build_assign_with_ops. > (vect_recog_pow_pattern, vect_recog_widen_sum_pattern, > vect_operation_fits_smaller_type, vect_recog_over_widening_pattern): > Likewise. > > --- gcc/tree-vect-patterns.c.jj 2011-10-06 12:37:34.000000000 +0200 > +++ gcc/tree-vect-patterns.c 2011-10-06 13:19:44.000000000 +0200 > @@ -400,7 +400,6 @@ vect_handle_widen_mult_by_const (gimple > new_oprnd = make_ssa_name (tmp, NULL); > new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, *oprnd, > NULL_TREE); > - SSA_NAME_DEF_STMT (new_oprnd) = new_stmt; > STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt)) = new_stmt; > VEC_safe_push (gimple, heap, *stmts, def_stmt); > *oprnd = new_oprnd; > @@ -619,7 +618,6 @@ vect_recog_widen_mult_pattern (VEC (gimp > var = vect_recog_temp_ssa_var (type, NULL); > pattern_stmt = gimple_build_assign_with_ops (WIDEN_MULT_EXPR, var, oprnd0, > oprnd1); > - SSA_NAME_DEF_STMT (var) = pattern_stmt; > > if (vect_print_dump_info (REPORT_DETAILS)) > print_gimple_stmt (vect_dump, pattern_stmt, 0, TDF_SLIM); > @@ -703,7 +701,6 @@ vect_recog_pow_pattern (VEC (gimple, hea > > var = vect_recog_temp_ssa_var (TREE_TYPE (base), NULL); > stmt = gimple_build_assign_with_ops (MULT_EXPR, var, base, base); > - SSA_NAME_DEF_STMT (var) = stmt; > return stmt; > } > > @@ -826,7 +823,6 @@ vect_recog_widen_sum_pattern (VEC (gimpl > var = vect_recog_temp_ssa_var (type, NULL); > pattern_stmt = gimple_build_assign_with_ops (WIDEN_SUM_EXPR, var, > oprnd0, oprnd1); > - SSA_NAME_DEF_STMT (var) = pattern_stmt; > > if (vect_print_dump_info (REPORT_DETAILS)) > { > @@ -1016,7 +1012,6 @@ vect_operation_fits_smaller_type (gimple > new_oprnd = make_ssa_name (tmp, NULL); > new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, > oprnd, NULL_TREE); > - SSA_NAME_DEF_STMT (new_oprnd) = new_stmt; > STMT_VINFO_RELATED_STMT (vinfo_for_stmt (def_stmt)) = new_stmt; > VEC_safe_push (gimple, heap, *stmts, def_stmt); > oprnd = new_oprnd; > @@ -1038,7 +1033,6 @@ vect_operation_fits_smaller_type (gimple > new_oprnd = make_ssa_name (tmp, NULL); > new_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, > oprnd, NULL_TREE); > - SSA_NAME_DEF_STMT (new_oprnd) = new_stmt; > oprnd = new_oprnd; > *new_def_stmt = new_stmt; > } > @@ -1141,9 +1135,9 @@ vect_recog_over_widening_pattern (VEC (g > VEC_safe_push (gimple, heap, *stmts, prev_stmt); > > var = vect_recog_temp_ssa_var (new_type, NULL); > - pattern_stmt = gimple_build_assign_with_ops ( > - gimple_assign_rhs_code (stmt), var, op0, op1); > - SSA_NAME_DEF_STMT (var) = pattern_stmt; > + pattern_stmt > + = gimple_build_assign_with_ops (gimple_assign_rhs_code (stmt), var, > + op0, op1); > STMT_VINFO_RELATED_STMT (vinfo_for_stmt (stmt)) = pattern_stmt; > STMT_VINFO_PATTERN_DEF_STMT (vinfo_for_stmt (stmt)) = new_def_stmt; > > @@ -1182,7 +1176,6 @@ vect_recog_over_widening_pattern (VEC (g > new_oprnd = make_ssa_name (tmp, NULL); > pattern_stmt = gimple_build_assign_with_ops (NOP_EXPR, new_oprnd, > var, NULL_TREE); > - SSA_NAME_DEF_STMT (new_oprnd) = pattern_stmt; > STMT_VINFO_RELATED_STMT (vinfo_for_stmt (use_stmt)) = pattern_stmt; > > *type_in = get_vectype_for_scalar_type (new_type); > > Jakub > > -- Richard Guenther <rguent...@suse.de> SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer