RFR(S): 8066763: fatal error "assert(false) failed: unexpected yanked node" in postaloc.cpp:139
vladimir.kozlov at oracle.com
Thu Dec 11 09:28:13 UTC 2014
Looks good but rename local from 'req' (required) to 'in' (input) or 'dead'.
On 12/11/14 1:14 AM, Tobias Hartmann wrote:
> please review the following patch.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8066763
> Webrev: http://cr.openjdk.java.net/~thartmann/8066763/webrev.00/
> A null check for an oop loaded by a LoadNNode (300) consists of a CmpNNode
> (388), a BoolNode (356) and a IfNode (357) .
> After matching, the CmpNNode is replaced by a testN_reg node (56) and a jmpCon
> node (55) . With implicit null checks enabled (default), the compiler notices
> that the oop is accessed by a nearby loadINode (131) and optimizes the code by
> using an implicit null check: Instead of checking the oop explicitly, the
> loadINode is moved upwards and executed without a check. Code is added to handle
> the SIGSEGV and throw the corresponding NullPointerException .
> The problem is that after the optimization the testN_reg node is dead (see )
> and triggers the assert in the register allocator. With implicit null checks
> disabled (-XX:-ImplicitNullChecks) the bug does not appear.
> The proposed fix checks for dead input nodes after removing the old compare
> node. This removes the dead testN_reg node (see ).
> - Failing test
> - JPRT
>  https://bugs.openjdk.java.net/secure/attachment/24158/1_before_matching.png
>  https://bugs.openjdk.java.net/secure/attachment/24187/2_global_code_motion.png
>  https://bugs.openjdk.java.net/secure/attachment/24159/1_global_code_motion.png
>  https://bugs.openjdk.java.net/secure/attachment/24161/3_global_code_motion.png
More information about the hotspot-compiler-dev