{
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
slsr_cand_t cc = lookup_cand (c->first_interp);
+ tree lhs = gimple_assign_lhs (c->cand_stmt);
+ basis_name = gimple_convert (&gsi, true, GSI_SAME_STMT,
+ UNKNOWN_LOCATION,
+ TREE_TYPE (lhs), basis_name);
+ bump_tree = gimple_convert (&gsi, true, GSI_SAME_STMT,
+ UNKNOWN_LOCATION,
+ TREE_TYPE (lhs), bump_tree);
gimple_assign_set_rhs_with_ops (&gsi, code, basis_name, bump_tree);
update_stmt (gsi_stmt (gsi));
while (cc)
cc->cand_stmt = gsi_stmt (gsi);
cc = lookup_cand (cc->next_interp);
}
+ if (gimple_needing_rewrite_undefined (gsi_stmt (gsi)))
+ rewrite_to_defined_unconditional (&gsi);
+
if (dump_file && (dump_flags & TDF_DETAILS))
stmt_to_print = gsi_stmt (gsi);
}
if (incr_vec[i].initializer)
{
+ tree init = incr_vec[i].initializer;
+ tree wanted_type = POINTER_TYPE_P (basis_type) ? c->stride_type : basis_type;
+
+ if (!types_compatible_p (TREE_TYPE (c->stride), wanted_type))
+ {
+ tree cast_stride = make_temp_ssa_name (wanted_type, NULL,
+ "slsr");
+ cast_stmt = gimple_build_assign (cast_stride, NOP_EXPR,
+ init);
+ init = cast_stride;
+ }
enum tree_code code = negate_incr ? MINUS_EXPR : plus_code;
- new_stmt = gimple_build_assign (lhs, code, basis_name,
- incr_vec[i].initializer);
+ new_stmt = gimple_build_assign (lhs, code, basis_name, init);
}
else {
tree stride;
&& (!operand_equal_p (new_rhs1, old_rhs2, 0)
|| !operand_equal_p (new_rhs2, old_rhs1, 0))))
{
+ tree lhs = gimple_assign_lhs (c->cand_stmt);
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
+ new_rhs1 = gimple_convert (&gsi, true, GSI_SAME_STMT,
+ UNKNOWN_LOCATION,
+ TREE_TYPE (lhs), new_rhs1);
+ new_rhs2 = gimple_convert (&gsi, true, GSI_SAME_STMT,
+ UNKNOWN_LOCATION,
+ TREE_TYPE (lhs), new_rhs2);
slsr_cand_t cc = lookup_cand (c->first_interp);
gimple_assign_set_rhs_with_ops (&gsi, new_code, new_rhs1, new_rhs2);
update_stmt (gsi_stmt (gsi));
cc = lookup_cand (cc->next_interp);
}
+ if (gimple_needing_rewrite_undefined (gsi_stmt (gsi)))
+ rewrite_to_defined_unconditional (&gsi);
if (dump_file && (dump_flags & TDF_DETAILS))
return gsi_stmt (gsi);
}
|| !operand_equal_p (rhs2, orig_rhs2, 0))
{
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
+ tree lhs = gimple_assign_lhs (c->cand_stmt);
slsr_cand_t cc = lookup_cand (c->first_interp);
+ basis_name = gimple_convert (&gsi, true, GSI_SAME_STMT,
+ UNKNOWN_LOCATION,
+ TREE_TYPE (lhs), basis_name);
+ rhs2 = gimple_convert (&gsi, true, GSI_SAME_STMT,
+ UNKNOWN_LOCATION,
+ TREE_TYPE (lhs), rhs2);
gimple_assign_set_rhs_with_ops (&gsi, MINUS_EXPR, basis_name, rhs2);
update_stmt (gsi_stmt (gsi));
while (cc)