-
Bug
-
Resolution: Won't Fix
-
P4
-
7
-
x86
-
solaris_9
The following program gets into spill split recycle, probably because of the high register pressure from having 3 constant longs.
public class lcmp {
public static long test(long a) {
if (a != 10) {
return 2;
} else {
return 1;
}
}
static volatile long value = 10;
static volatile long value2 = 0;
public static void main(String[] args) {
long total = 0;
for (int i = 0; i < 20000; i++) {
total += test(value);
total += test(value2);
}
System.out.println(total);
}
}
After the fix forJDK-5032515 this appear to be the only remaining spill split recycle problem we have in the full compile the world.
public class lcmp {
public static long test(long a) {
if (a != 10) {
return 2;
} else {
return 1;
}
}
static volatile long value = 10;
static volatile long value2 = 0;
public static void main(String[] args) {
long total = 0;
for (int i = 0; i < 20000; i++) {
total += test(value);
total += test(value2);
}
System.out.println(total);
}
}
After the fix for