RFR(S): 8231988: Unexpected test result caused by C2 IdealLoopTree::do_remove_empty_loop
Yangfei (Felix)
felix.yang at huawei.com
Thu Oct 10 04:55:16 UTC 2019
Hi,
After some more try, I finally came up with a test case which does not depend on 8u javac to trigger the problem.
public class Test8231988 {
public void mainTest() {
int i = 34;
for (; i > 0; i -= 11);
if (i < 0) {
// Test passed
} else {
throw new RuntimeException("Test failed");
}
}
public static void main(String[] args) {
Test8231988 _instance = new Test8231988();
for (int i = 0; i < 50000; i++) {
_instance.mainTest();
}
System.out.println("Test passed.");
}
}
$ java -version
openjdk version "14-internal" 2020-03-17
OpenJDK Runtime Environment (build 14-internal+0-adhoc.yangfei.openjdk-jdk)
OpenJDK 64-Bit Server VM (build 14-internal+0-adhoc.yangfei.openjdk-jdk, mixed mode, sharing)
$ javac Test8231988.java
$ java -Xint Test8231988
Test passed.
$ java -XX:-BackgroundCompilation -XX:-TieredCompilation Test8231988
Exception in thread "main" java.lang.RuntimeException: Test failed
at Test8231988.mainTest(Test8231988.java:44)
at Test8231988.main(Test8231988.java:51)
I am going to add this under test/hotspot/jtreg/compiler/c2 directory.
Thanks,
Felix
>
> Hmm...
> Looks like the reduced test case on the bugzilla is not suitable for us.
> It needs to be compiled by a 8u javac in order to triggers this problem.
> The bug will not trigger if we compile the test case by 11u javac or higher
> versions.
> I don't have other test cases to trigger this bug for now.
>
> Thanks,
> Felix
>
> >
> > Hi Nils,
> >
> > Thanks for performing the test.
> > Sure, let me add one based on the reduced test case on the bugzilla.
> >
> > Felix
> >
> > >
> > > Hi Felix,
> > >
> > > Do you have a test case that triggers this problem? Could you add
> > > that as a jtreg test?
> > >
> > > I have run your patch through testing tier1-3 and the results look good.
> > >
More information about the hotspot-compiler-dev
mailing list