RFR(S): 8241900: Loop unswitching may cause dependence on null check to be lost
Tobias Hartmann
tobias.hartmann at oracle.com
Mon Apr 6 07:48:50 UTC 2020
Hi Roland,
On 03.04.20 10:55, Roland Westrelin wrote:
> The fix I propose is to keep the dependence on the hoisted test on loop
> unswitching by using dominated_by() instead of short_circuit_if(). This
> way on step 2) 3) above, the CastPP is made dependent on the hoisted
> test so reordering of the CastPP with its null check can't happen.
This seems reasonable but I'm wondering if that doesn't enable incorrect re-ordering of dependent
data nodes with other tests in-between the original and the hoisted test? I.e., without your fix,
data nodes are made dependent on the test "just above" the unswitched test. With your fix, they are
dependent on the hoisted test outside of the loop body.
Please add the appropriate affects versions to the bug. Also, please add a link to the JBS bug to
your RFRs.
Best regards,
Tobias
More information about the hotspot-compiler-dev
mailing list