RFR(S): 8231988: Unexpected test result caused by C2 IdealLoopTree::do_remove_empty_loop

Yangfei (Felix) felix.yang at huawei.com
Fri Oct 11 00:45:18 UTC 2019


Updated webrev: http://cr.openjdk.java.net/~fyang/8231988/webrev.01/
Is it OK to go?  

Thanks,
Felix


> 
> 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.



More information about the hotspot-compiler-dev mailing list