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

x86: Shorter movptr(reg, imm) for 32-bit unsigned immediates

XMLWordPrintable

    • b08

      We noticed in JDK-8323497 that `movptr` optimization done in JDK-8319406 is not covering the case of immediates that fit in 32-bit unsigned, but do not fit in 32-bit signed. In that case, we can maybe do `mov r32, imm32` and rely on x86 zero-extending 32->64 bit for us. Since `movl` encoding is smaller than sign-extending `movq`, we also save more code on most paths that JDK-8319406 improved.

      This saves additional 0.1..0.8% of code for Xcomp HelloWorld.
       https://github.com/openjdk/jdk/pull/17343

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: