+2018-08-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87117
+ * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
+ re-value-number released SSA VDEFs.
+
2018-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87126
+2018-08-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/87117
+ * gfortran.dg/pr87117.f90: New testcase.
+
2018-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87126
propagate_tree_value_into_stmt (gsi, sprime);
stmt = gsi_stmt (*gsi);
update_stmt (stmt);
+ /* In case the VDEF on the original stmt was released, value-number
+ it to the VUSE. This is to make vuse_ssa_val able to skip
+ released virtual operands. */
if (vdef != gimple_vdef (stmt))
- VN_INFO (vdef)->valnum = vuse;
+ {
+ gcc_assert (SSA_NAME_IN_FREE_LIST (vdef));
+ VN_INFO (vdef)->valnum = vuse;
+ }
/* If we removed EH side-effects from the statement, clean
its EH information. */
fprintf (dump_file, " Removed AB side-effects.\n");
}
update_stmt (stmt);
- if (vdef != gimple_vdef (stmt))
+ /* In case the VDEF on the original stmt was released, value-number
+ it to the VUSE. This is to make vuse_ssa_val able to skip
+ released virtual operands. */
+ if (vdef && SSA_NAME_IN_FREE_LIST (vdef))
VN_INFO (vdef)->valnum = vuse;
}