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

AARCH64: I2L/L2I conversions can be skipped for masked positive values

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      aarch64
    • OS:
      generic

      Description

      On the following example sxtw (i2l) can be skipped because the value is positive.

      ; - org.apache.lucene.util.packed.DirectReader$DirectPackedReader16::get@12 (line 185)
      0x0000ffff706b7d54: sxth w10, w10
      0x0000ffff706b7d58: and w10, w10, #0xffff
      0x0000ffff706b7d5c: sxtw x2, w10 ; this i2l is excessive

      https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/util/packed/DirectReader.java#L185
      183 public long get(long index) {
      184 try {
      185 return in.readShort(offset + (index << 1)) & 0xFFFF;

        Attachments

          Activity

            People

            • Assignee:
              bulasevich Boris Ulasevich
              Reporter:
              bulasevich Boris Ulasevich
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: