RFR(S): 8210646: [lworld] C2 compilation fails with "assert(!target->is_ready()) failed: our arrival must be expected"
tobias.hartmann at oracle.com
Thu Sep 13 11:34:05 UTC 2018
please review the following patch:
With value types, the acmp implementation looks like this:
(1) for 'a != b':
do_if(a != b) -> taken_branch
do_if(a is value) -> taken_branch
(2) for 'a == b':
do_if(a == b) -> do_if(a is not value) -> taken_branch
Now Parse::do_if() will mark an unreachable successor block as parsed which is not correct for the
first taken_branch in (1) and the first untaken_branch in (2) because they might still be reachable
through the second if. Marking them as taken will trigger an assert when merging into those blocks
later through the second do_if.
The fix is to not mark the corresponding branch as taken in case (1) and (2). I've verified the fix
with replay compilation, the new regression test cases and the failing tests in the CI.
More information about the valhalla-dev