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

[lworld] C2 compilation fails with assert(n->Opcode() != Op_Phi) failed: cannot match

XMLWordPrintable

      # Internal Error (/oracle/valhalla/open/src/hotspot/share/opto/matcher.cpp:1482), pid=173448, tid=173463
      # assert(n->Opcode() != Op_Phi) failed: cannot match

      Current CompileTask:
      C2: 575 31 % b MainClass::method1 @ 25 (57 bytes)

      Stack: [0x00007f40b1736000,0x00007f40b1837000], sp=0x00007f40b1832110, free space=1008k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x14c638e] Matcher::match_tree(Node const*)+0x81e
      V [libjvm.so+0x14d340f] Matcher::xform(Node*, int)+0xe4f
      V [libjvm.so+0x14d990d] Matcher::match()+0x431d
      V [libjvm.so+0xa4718c] Compile::Code_Gen()+0x9c
      V [libjvm.so+0xa51356] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1ad6
      V [libjvm.so+0x86d0fa] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1ea
      V [libjvm.so+0xa61898] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xe08
      V [libjvm.so+0xa623e8] CompileBroker::compiler_thread_loop()+0x5a8
      V [libjvm.so+0x198e646] JavaThread::thread_main_inner()+0x256
      V [libjvm.so+0x1994fc0] Thread::call_run()+0x100
      V [libjvm.so+0x164f926] thread_native_entry(Thread*)+0x116

      inline class Test0 {
          int x = 42;
          short[] array = new short[7];
      }

      public class MainClass {
          int f = 1;

          public void method1(Test0[] array) {
              for (int i = 0; i < 100; ++i) {
                  array[0] = array[0];
                  for (int j = 0; j < 10; ++j) {
                      for (int k = 0; k < 10; ++k) {
                          f = 42;
                      }
                  }
              }
          }

          public static void main(String[] args) {
              MainClass t = new MainClass();
              Test0[] array = new Test0[] {new Test0()};
              for (int l1 = 0; l1 < 10000; ++l1) {
                  t.method1(array);
              }
          }
      }

            roland Roland Westrelin
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: