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

[lworld][c1] Block merging need to preserve type info for flattened arrays

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      For the following bytecodes:

             0: iload_0
             1: ifeq 12
             4: iconst_5
             5: anewarray #2 // class "QV;"
             8: astore_1
             9: goto 18
            12: bipush 10
            14: anewarray #2 // class "QV;"
            17: astore_1
      >> 18: aload_1
            19: iconst_0
            20: aaload

      At bytecode 18, the type of local #1 is merged. BlockBegin::try_merge() would just tag it as an object, losing the exact type information, which should be "[QV;".

      Because the aaload bytecode at 20 doesn't carry type information, it has no idea whether it suppose to access a flattened array.

      Only aaload/asstore seem to be affected. For example, getfield carry type information so it knows whether it's accessing a flattened field or not.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iklam Ioi Lam
                Reporter:
                iklam Ioi Lam
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: