diff mbox series

Fix missing next_value_id initialization

Message ID alpine.LSU.2.20.1905101359070.10704@zhemvz.fhfr.qr
State New
Headers show
Series Fix missing next_value_id initialization | expand

Commit Message

Richard Biener May 10, 2019, 11:59 a.m. UTC
also value_id for inserted calls was uninitialized.

Bootstrapped / tested on x86_64-unknown-linux-gnu, applied to trunk and 
branch.

Richard.

2019-05-10  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (visit_reference_op_call): Initialize value-id.
	(do_rpo_vn): Initialize next_value_id.
diff mbox series

Patch

Index: gcc/tree-ssa-sccvn.c
===================================================================
--- gcc/tree-ssa-sccvn.c	(revision 271001)
+++ gcc/tree-ssa-sccvn.c	(working copy)
@@ -4059,6 +4059,7 @@  visit_reference_op_call (tree lhs, gcall
       vr2->hashcode = vr1.hashcode;
       vr2->result = lhs;
       vr2->result_vdef = vdef_val;
+      vr2->value_id = 0;
       slot = valid_info->references->find_slot_with_hash (vr2, vr2->hashcode,
 							  INSERT);
       gcc_assert (!*slot);
@@ -6467,6 +6468,7 @@  do_rpo_vn (function *fn, edge entry, bit
   unsigned region_size = (((unsigned HOST_WIDE_INT)n * num_ssa_names)
 			  / (n_basic_blocks_for_fn (fn) - NUM_FIXED_BLOCKS));
   VN_TOP = create_tmp_var_raw (void_type_node, "vn_top");
+  next_value_id = 1;
 
   vn_ssa_aux_hash = new hash_table <vn_ssa_aux_hasher> (region_size * 2);
   gcc_obstack_init (&vn_ssa_aux_obstack);