+2016-10-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/77824
+ * gimple-ssa-strength-reduction.c (stmt_cost): Explicitly return
+ zero cost for copies.
+ (find_candidates_dom_walker::before_dom_children): Replace
+ MODIFY_EXPR with SSA_NAME.
+ (replace_mult_candidate): Likewise.
+ (replace_profitable_candidates): Likewise.
+
2016-10-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.h: Wrap more macros args in brackets and fix
/* Note that we don't assign costs to copies that in most cases
will go away. */
+ case SSA_NAME:
+ return 0;
+
default:
;
}
gcc_fallthrough ();
CASE_CONVERT:
- case MODIFY_EXPR:
+ case SSA_NAME:
case NEGATE_EXPR:
rhs1 = gimple_assign_rhs1 (gs);
if (TREE_CODE (rhs1) != SSA_NAME)
slsr_process_cast (gs, rhs1, speed);
break;
- case MODIFY_EXPR:
+ case SSA_NAME:
slsr_process_copy (gs, rhs1, speed);
break;
&& bump.to_shwi () != HOST_WIDE_INT_MIN
/* It is not useful to replace casts, copies, or adds of
an SSA name and a constant. */
- && cand_code != MODIFY_EXPR
+ && cand_code != SSA_NAME
&& !CONVERT_EXPR_CODE_P (cand_code)
&& cand_code != PLUS_EXPR
&& cand_code != POINTER_PLUS_EXPR
to a cast or copy. */
if (i >= 0
&& profitable_increment_p (i)
- && orig_code != MODIFY_EXPR
+ && orig_code != SSA_NAME
&& !CONVERT_EXPR_CODE_P (orig_code))
{
if (phi_dependent_cand_p (c))