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

Fix array range check hoisting for some scaled loop iv

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • b08
    • generic
    • generic
    • Fix failed

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: