-
Enhancement
-
Resolution: Unresolved
-
P4
-
24
-
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.
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.
- relates to
-
JDK-8328528 C2 should optimize long-typed parallel iv in an int counted loop
- Resolved