RFR: 8272562: C2: assert(false) failed: Bad graph detected in build_loop_late [v2]

Roland Westrelin roland at openjdk.java.net
Mon Sep 27 13:57:57 UTC 2021


On Mon, 27 Sep 2021 12:52:50 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   conservative fix
>
> src/hotspot/share/opto/loopopts.cpp line 1449:
> 
>> 1447:       !is_raw_to_oop_cast && // don't extend live ranges of raw oops
>> 1448:       n->Opcode() != Op_Opaque4 &&
>> 1449:       (n->Opcode() == Op_CastII && ((CastIINode*)n)->has_range_check())) {
> 
> Shouldn't the condition be inverted? This would only allow to sink range check `CastII` nodes.
> And couldn't you use `!(n->is_CastII() && n->as_CastII()->has_range_check())` instead of the explicit cast?

Right! Thanks for catching this. Actually after thinking more about this, I changed the fix to prevent all nodes that can capture a type from being sunk to be on the safe side, for now.

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

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


More information about the hotspot-compiler-dev mailing list