JDK-7154567 : [TESTBUG] compiler/7052494/Test7052494.java times out when run with C1
Type:Bug
Component:hotspot
Sub-Component:compiler
Affected Version:hs23
Priority:P4
Status:Closed
Resolution:Duplicate
OS:generic
CPU:generic
Submitted:2012-03-16
Updated:2019-09-13
Resolved:2014-05-14
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
The test compiler/7052494/Test7052494.java times out when run with C1.
However, it passes with C2.
Comments
The test was fixed by 7067288: compiler regression test Test7052494 timeouts with client VM.
The code in the description is old before 7067288 fix.
7067288 was fixed in 2011. I don't know why this bug was filed. Please, verify if the problem still exists and close as dup if not.
08-05-2014
ILW=MLH=>P4
08-05-2014
What is this supposed to test? Showing correctness should not need more than one or a few iterations.
It would be nice if c1 could remove the loop, but unless it is a regression, the loop removal should be a separate enhancement.
08-05-2014
EVALUATION
Test7052494::test5 executes for too long when compiled with C1.
C1 doesn't optimize away the loop.
Method code looks like:
test/compiler/7052494/Test7052494.java:
73 static int test5(int i) {
74 System.out.println("test5");
75 int result = 0;
76 while (i++ != 0) {
77 result = i*2;
78 }
79 return result;
80 }
It is invoked 11k times with i=1:
144 for (int i = 0; i < 11000; i++) {
145 int k = test5(1);
146 if (k != 0) {
147 System.out.println("FAILED: " + k + " != 0");
148 failed = true;
149 break;
150 }
151 }