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

C2 fails rematerializing nodes using flag registers.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b96

      Description

      We see assert(false, "attempted to spill a non-spillable item") running jck tests with the ppc64 port.
      This assertion in get_spillcopy_wide() is reached from split_Rematerialize() that inserts a SpillCopy
      of kind InputToRematerialization in the prolonged live range. In the opt build this results
      in a not compilable method.

      In our case, 'def' is a node consuming a condition register defined by 'in'. Get_spillcopy_wide()
      realizes condition registers (Op_RegFlags) can not be spilled and aborts.

      As register allocation can not spill condition registers, it would have rematerialized 'in' later on, too.
      So actually, the SpillCopy in the prolonged live range is not needed.

      As a fix, we skip adding it in case split_Rematerialze handles an operation consuming a condition register.
      Also, this change modifies rematerialize() to avoid that this pattern causes several live ranges to be streched.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                goetz Goetz Lindenmaier
                Reporter:
                goetz Goetz Lindenmaier
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: