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

C2: implement parallel iv for long counted loops

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 24
    • 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.

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

              Created:
              Updated: