C2: implement parallel iv for long counted loops

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 24
    • Component/s: hotspot
    • generic
    • generic

      Currently C2 only does parallel IV replacement for int typed counted loops. It would be great if it could do so with long typed counted loops, too.

        public static long longCountedLoop()
          long a = 0;
          for (long i = 0; i < 1000; i++) {
            a += 42; // <-- 42 is a long constant
          }

          return a;
        }

      IV replacement should also work for `a` typed as int with correct overflow behaviours.

            Assignee:
            Kangcheng Xu
            Reporter:
            Kangcheng Xu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: