From: Eric Botcazou Date: Mon, 13 Jun 2016 17:44:12 +0000 (+0000) Subject: tree-ssa-sccvn.c (vn_reference_lookup_3): Use a uniform test and update shared_lookup... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec67c62e3c3b4f2cc6f328135b87f562e20e1b75;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 89098e7db11..b1026bdcf47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-06-13 Eric Botcazou + + * 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 PR middle-end/71373 diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 730db04ff8b..0cbd2cd56f2 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -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 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 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