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

[lworld] LoadNode::Identity optimization should not skip casts

XMLWordPrintable

      # Internal Error (/home/roland/valhalla/src/hotspot/share/ci/ciInlineKlass.cpp:52), pid=2898322, tid=2898332
      # assert(contains_field_offset(offset)) failed: invalid field offset

      Stack: [0x00007f851b03a000,0x00007f851b13b000], sp=0x00007f851b135080, free space=1004k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x8e92c4] ciInlineKlass::field_index_by_offset(int)+0x134
      V [libjvm.so+0xea4ee6] InlineTypeBaseNode::field_value_by_offset(int, bool) const+0x36
      V [libjvm.so+0x14e9445] LoadNode::Identity(PhaseGVN*)+0x1e5
      V [libjvm.so+0x16c3ca2] PhaseIterGVN::transform_old(Node*)+0x2f2
      V [libjvm.so+0x16bcc3e] PhaseIterGVN::optimize()+0x7e
      V [libjvm.so+0xa460ac] Compile::inline_incrementally_cleanup(PhaseIterGVN&)+0x75c
      V [libjvm.so+0xa505c9] Compile::inline_incrementally(PhaseIterGVN&)+0x289
      V [libjvm.so+0xa50e89] Compile::Optimize()+0x359
      V [libjvm.so+0xa53c56] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0x1656
      V [libjvm.so+0x847f00] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x6a0
      V [libjvm.so+0xa63e59] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xc39
      V [libjvm.so+0xa64ab8] CompileBroker::compiler_thread_loop()+0x518
      V [libjvm.so+0x19776fc] JavaThread::thread_main_inner()+0x27c
      V [libjvm.so+0x197dcb0] Thread::call_run()+0x100
      V [libjvm.so+0x162e574] thread_native_entry(Thread*)+0x104

      Failure occurs in LoadNode::Identity()
      base is a CheckCastPP to java/lang/String
      base->in(1) is an InlineTypePtr
      base->in(0) is an If projection for a test that checks the class of base->in(1) and the type of the CheckCastPP are the same

      That test should constant fold and the branch where the LoadNode is be removed but that hasn't happened yet.

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

              Created:
              Updated:
              Resolved: