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

Eliminate unnecessary vector mask conversion during VectorUnbox for floating point VectorMask

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 17
    • 17
    • hotspot
    • b19

    Description

      Normally, the "VectorUnbox (VectorBox v)" can be optimized to "v" if their types are equal. And when unboxing vector mask, if their bottom_type is not equal, the VectorUnbox/VectorBox can also be eliminated by applying "VectorUnbox (VectorBox vmask) ==> VectorLoadMask (VectorStoreMask vmask)".

      However, since some Vector APIs define different element type for floating point VectorMask (i.e. the logical APIs and "maskAll" use "long/int" as the element type, while others use "double/float"), the vector box/unbox types can be different for "VectorUnbox (VectorBox vmask)". The compiler will optimize it to "VectorLoadMask (VectorStoreMask vmask)". This is unnecessary and it can be optimized to "vmask", since double/float and long/int is the same for VectorMask.

      Attachments

        Issue Links

          Activity

            People

              xgong Xiaohong Gong
              xgong Xiaohong Gong
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: