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

C2 fails rematerializing nodes using flag registers.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • b96

      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.

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

              Created:
              Updated:
              Resolved: