Commit ec67c62e by Eric Botcazou Committed by Eric Botcazou

tree-ssa-sccvn.c (vn_reference_lookup_3): Use a uniform test and update…

tree-ssa-sccvn.c (vn_reference_lookup_3): Use a uniform test and update shared_lookup_references only once after changing...

	* tree-ssa-sccvn.c (vn_reference_lookup_3): Use a uniform test and
	update shared_lookup_references only once after changing operands.

From-SVN: r237388
parent f7e4f2e3
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-sccvn.c (vn_reference_lookup_3): Use a uniform test and
update shared_lookup_references only once after changing operands.
2016-06-13 Thomas Schwinge <thomas@codesourcery.com>
PR middle-end/71373
......
......@@ -2089,11 +2089,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_,
/* We need to pre-pend vr->operands[0..i] to rhs. */
vec<vn_reference_op_s> old = vr->operands;
if (i + 1 + rhs.length () > vr->operands.length ())
{
vr->operands.safe_grow (i + 1 + rhs.length ());
if (old == shared_lookup_references)
shared_lookup_references = vr->operands;
}
vr->operands.safe_grow (i + 1 + rhs.length ());
else
vr->operands.truncate (i + 1 + rhs.length ());
FOR_EACH_VEC_ELT (rhs, j, vro)
......@@ -2244,8 +2240,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *vr_,
{
vec<vn_reference_op_s> old = vr->operands;
vr->operands.safe_grow_cleared (2);
if (old == shared_lookup_references
&& vr->operands != old)
if (old == shared_lookup_references)
shared_lookup_references = vr->operands;
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment