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

[REDO] Fix array range check hoisting for some scaled loop iv

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • b08
    • generic
    • generic

      Recently we found that in some loops with scaled array accesses, array range checks are not hoisted by loop predication. A typical case is below.

       for (int i = 0; i < size; i++) {
           b[3 * i] = a[3 * i];
       }

      Initial investigation found that GVN optimizes the array index "3 * i" into "i << 1 + i" so it's regarded as non-linear.

            pli Pengfei Li
            pli Pengfei Li
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: