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

Support the vectorization of some counting-down loops in SLP

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b21
    • CPU:
      generic
    • OS:
      generic

      Description

      Below counting down loop in "bar()" should be vectorizable by C2 superword. But actually it's not. We should investigate why. Initial investigation shows that no valid SWPointer is found for this pattern.
      ```
        private static final int SIZE = 2345;
        private static int[] a = new int[SIZE];
        private static int[] b = new int[SIZE];

        public static void bar() {
            for (int i = 1000; i > 0; i--) {
                b[SIZE - i] = a[SIZE - i];
            }
        }
      ```

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fgao Fei Gao
              Reporter:
              fgao Fei Gao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: