Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8328480

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 23
    • 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.

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

              Created:
              Updated:
              Resolved: