src/share/vm/opto/lcm.cpp

changeset 9912
97d09139b360
parent 9475
61523d110335
child 9931
fd44df5e3bc3
child 9953
8a8f679915aa
     1.1 --- a/src/share/vm/opto/lcm.cpp	Tue May 05 18:39:57 2020 +0100
     1.2 +++ b/src/share/vm/opto/lcm.cpp	Tue Mar 10 10:46:35 2020 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -815,6 +815,13 @@
    1.11          // and the edge will be lost. This is why this code should be
    1.12          // executed only when Precedent (== TypeFunc::Parms) edge is present.
    1.13          Node *x = n->in(TypeFunc::Parms);
    1.14 +        if (x != NULL && get_block_for_node(x) == block && n->find_prec_edge(x) != -1) {
    1.15 +          // Old edge to node within same block will get removed, but no precedence
    1.16 +          // edge will get added because it already exists. Update ready count.
    1.17 +          int cnt = ready_cnt.at(n->_idx);
    1.18 +          assert(cnt > 1, err_msg("MemBar node %d must not get ready here", n->_idx));
    1.19 +          ready_cnt.at_put(n->_idx, cnt-1);
    1.20 +        }
    1.21          n->del_req(TypeFunc::Parms);
    1.22          n->add_prec(x);
    1.23        }

mercurial