C2: SubTypeCheckNode in checkcast should use the klass constant of a unique concrete sub class

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 23
    • Component/s: hotspot
    • b19

      GraphKit::gen_checkcast() calls try_improve() on the super class to improve the type if there is a unique concrete sub type. This type is then fed into the CheckCastPPNode result after the sub type check. However, the SubTypeCheckNode itself gets the unimproved super klass constant as input. This blocks some graph optimizations to fold sub type checks.

      In Valhalla, this even leads to a (Valhalla-specific) bug where the CheckCastPPNode type is known to be impossible and therefore replaced by top while the corresponding SubTypeCheckNode is not removed due to this limitation.

      This RFE should improve the SubTypeCheckNode to get the improved unique sub class constant as input.

            Assignee:
            Christian Hagedorn
            Reporter:
            Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: