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

Following 8241492, strip mined loop may run extra iterations

XMLWordPrintable

    • b26

      For a method like this:

          private static int test1(int start, int stop) {
              int sum = 0;
              int i = start;
              do {
                  synchronized (new Object()) {
                  }
                  sum += i;
                  i++;
              } while (i < stop);
              return sum;
          }

      when run with stop < start, the body should be run once (there is no test to guard entry in the method) but is run LoopStripMiningIter.

            roland Roland Westrelin
            roland Roland Westrelin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: