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

TEMP vector registers could be incorrectly assigned upper bank xmm registers after Generic Operands (JDK-8234391)

    Details

    • Subcomponent:
    • Introduced In Version:
      14
    • Resolved In Build:
      b30
    • CPU:
      x86
    • Verification:
      Not verified

      Backports

        Description

        TEMP vector registers could be incorrectly assigned upper bank xmm registers after Generic Operands (JDK-8234391)

        There are cases where we need the TEMP to be xmm0-xmm31 for SKX and xmm0-xmm15 for KNL.
        Selecting the TEMP operand type as vecX, vecY used to provide us that.
        vecX/vecY is the entire range (xmm0-xmm31) for SKX and (xmm0-xmm15) for KNL.
        vecZ is entire range (xmm0-xmm31) for both SKX and KNL.

        With Generic Operands (JDK-823439), TEMP is now specialized to a vector register of max_vector_size(). There is a correctness issue with this.
        Say if we have an ad file instruct which had TEMP as vecX or vecY and it was required that the vector register be limited to xmm0-15 for KNL but not for SKX.
        Now we replaced that TEMP by max_vector_size(), the Matcher::specialize_generic_vector_operand() sets the temp to vecZ which has the range xmm0-31.

        Such cases arise for add and mul reduction rules and the long replicates in x86.ad.

        The fix proposed for JDK 14 is to specialize the TEMP to legVecZ instead for KNL, there by limiting it to xmm0-15.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sviswanathan Sandhya Viswanathan
                  Reporter:
                  sviswanathan Sandhya Viswanathan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: