+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
/* 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)
{
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