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

aarch64: some more integer rotate instructions are never emitted

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      9
    • Resolved In Build:
      b126
    • CPU:
      aarch64
    • OS:
      linux

      Description

          The left rotate instructions have the same issue with https://bugs.openjdk.java.net/browse/JDK-8154537.

          (src << shift) | (src >>> -shift) with src an int have some support in the aarch64.ad ad file: rolI_rReg_Var_C_32 and rolI_rReg_Var_C0, but their definitions is broken and never match any ideal graph subtree.

          Simpe test case:
      import java.lang.Integer.*;

      public class test {
        public static int foo (int x) {
          return Integer.rotateLeft(x, 1);
        }

        public static void main(String[] args) {
          int x = 0x1234;

          for (int i = 0; i < 50000; i++) {
            x = foo(x);
          }
        }
      }

          before optimizing:
        0x0000007f74d13454: neg w11, w2
        0x0000007f74d13458: lsr w12, w1, w11
        0x0000007f74d1345c: lsl w10, w1, w2
        0x0000007f74d13460: orr w0, w10, w12 ;*ior {reexecute=0 rethrow=0 return_oop=0}
                                                      ; - java.lang.Integer::rotateLeft@7 (line 1751)
      after optimizing:
        0x0000007f6cd135d4: neg w8, w2
        0x0000007f6cd135d8: ror w0, w1, w8 ;*ior {reexecute=0 rethrow=0 return_oop=0}
                                                      ; - java.lang.Integer::rotateLeft@7 (line 1751)

        Activity

        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/e81e22c7b180
        User: fyang
        Date: 2016-05-27 12:39:57 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/e81e22c7b180 User: fyang Date: 2016-05-27 12:39:57 +0000
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/e81e22c7b180
        User: lana
        Date: 2016-07-06 20:17:31 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/e81e22c7b180 User: lana Date: 2016-07-06 20:17:31 +0000

          People

          • Assignee:
            fyang Felix Yang
            Reporter:
            fyang Felix Yang
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: