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

C2: failed: malformed control flow. Limit type made precise with MaxL/MinL

XMLWordPrintable

    • b20

        Attached Test.java triggers compilation bailout.

        https://github.com/openjdk/jdk/blob/8f195ff236000d9c019f8beb2b13355083e211b5/src/hotspot/share/opto/compile.cpp#L3992

        I set an assert at that position, and debugged it quickly. The issue seems to be that there is an IfNode with only one Proj output. This is obviously a BUG. Going futher back, it seems the second projection was removed during dead code removal.

        Run with
        ./java -XX:CompileCommand=compileonly,Test::test -XX:MaxVectorSize=64 -Xcomp -XX:CompileCommand=dontinline,Test::* -XX:+UnlockExperimentalVMOptions -XX:PerMethodSpecTrapLimit=0 -XX:PerMethodTrapLimit=0 -XX:+PrintCompilation -XX:CompileCommand=quiet Test.java

        In the PrintCompilation log, one can find this:

        made not compilable on level 3 Test::run (11 bytes) excluded by CompileCommand
           4123 84 b 3 Test::test (32 bytes)
           4124 85 b 4 Test::test (32 bytes)
           4163 85 b 4 Test::test (32 bytes) COMPILE SKIPPED: malformed control flow (retry at different tier)

        I found this bug during my work of JDK-8298935. The IR framework complained that one of my test functions is "not compilable (anymore) at level C2".

        We should probably add
        assert(false, "reason")
        to as many bailout locations as possible, so that we can detect bugs in debug mode, rather than just ignoring broken graphs.

          1. Test5.java
            0.2 kB
          2. Test4.java
            0.5 kB
          3. Test3.java
            8 kB
          4. Test2.java
            2 kB
          5. Test.java
            0.7 kB
          6. FuzzerUtils.java
            13 kB

              epeter Emanuel Peter
              epeter Emanuel Peter
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: