-
Enhancement
-
Resolution: Fixed
-
P4
-
23
-
b21
-
generic
-
generic
Current parallel iv optimization only happens in an int counted loop with int-typed parallel iv's. Optimization for the following code should be considered:
private static long testIntCountedLoopWithLongIv(int stop) {
long a = 0; // <-- typed long
for (int i = 0; i < stop; i++) {
a += 42; // <-- 42 is a long constant
}
return a;
}
where the value of `a` should be eventually optimized to a constant time operation dependent on `stop`.
private static long testIntCountedLoopWithLongIv(int stop) {
long a = 0; // <-- typed long
for (int i = 0; i < stop; i++) {
a += 42; // <-- 42 is a long constant
}
return a;
}
where the value of `a` should be eventually optimized to a constant time operation dependent on `stop`.
- duplicates
-
JDK-8149745 C2 should optimize long accumulations in a counted loop
- Closed
- relates to
-
JDK-8342708 C2: implement parallel iv for long counted loops
- Open
-
JDK-8275913 C2 does not optimize memory access within a loop
- Open
- links to
-
Commit(master) openjdk/jdk/80ec5522
-
Review(master) openjdk/jdk/18489