RFR: 8265132 : C2 compilation fails with assert "missing precedence edge" [v4]

Dean Long dlong at openjdk.java.net
Thu Jun 17 19:09:27 UTC 2021


On Thu, 17 Jun 2021 10:23:14 GMT, Jamsheed Mohammed C M <jcm at openjdk.org> wrote:

>> src/hotspot/share/opto/gcm.cpp line 816:
>> 
>>> 814:       assert(store != load->find_exact_control(load->in(0)), "dependence cycle found");
>>> 815:       if (verify) {
>>> 816:         assert(store->find_edge(load) != -1 || unrelated_load_in_store_null_block(store, load),
>> 
>> I'm probably missing something, but the new code doesn't look equivalent to the old code, unless the bug fix is part of the refactoring.  You removed the check against LCA and added a new dominates check.
>
> it is refactoring. both issue has same property in terms of the load being used only in null block most probably by uncommon trap. gcm late scheduling schedule it in null block, later implicit null check moves another store which is unrelated to the load in null block to null check block. we don't rerun insert_anti_dependence for null_block after these move as it is not required, so we never put an anti-dependence edge load to store here. verification phase cribs about this.
> 
> as  issues are same, now i check whether the load is in null block of the store.

You seem to have replaced LCA == store_null_block with the equivalent of store_null_block->dominates(get_block_for_node(load)).  Please explain.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4200


More information about the hotspot-compiler-dev mailing list