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

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

XMLWordPrintable

    • b08
    • aarch64
    • generic

        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;

              bulasevich Boris Ulasevich
              bulasevich Boris Ulasevich
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: