Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8356708

C2: loop strip mining expansion doesn't take sunk stores into account

XMLWordPrintable

    • master

        Attached Test.java fails when C2 compiled.

            static void test() {
                for (int i = 1500; i > 0; i--) {
                    try {
                        int tmp = array[idx--];
                    } catch (Exception e) {
                        // Ignore
                    }
                }
            }

        java -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::test -XX:-TieredCompilation -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM Test.java
        Exception in thread "main" java.lang.RuntimeException: Wrong result: -2500 != -1500
        at Test.main(Test.java:43)

              roland Roland Westrelin
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: