Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/doCall.cpp @ 20552:331df100ad40
8059299: assert(adr_type != NULL) failed: expecting TypeKlassPtr
Summary: Use top() for dead paths when initializing Phi node of exceptions klasses in Parse::catch_inline_exceptions().
Reviewed-by: jrose, vlivanov
author | kvn |
---|---|
date | Thu, 02 Oct 2014 11:36:44 -0700 |
parents | 411e30e5fbb8 |
children | e7b3d177adda |
line wrap: on
line diff
--- a/src/share/vm/opto/doCall.cpp Fri Oct 17 07:27:03 2014 -0700 +++ b/src/share/vm/opto/doCall.cpp Thu Oct 02 11:36:44 2014 -0700 @@ -799,10 +799,16 @@ // each arm of the Phi. If I know something clever about the exceptions // I'm loading the class from, I can replace the LoadKlass with the // klass constant for the exception oop. - if( ex_node->is_Phi() ) { - ex_klass_node = new (C) PhiNode( ex_node->in(0), TypeKlassPtr::OBJECT ); - for( uint i = 1; i < ex_node->req(); i++ ) { - Node* p = basic_plus_adr( ex_node->in(i), ex_node->in(i), oopDesc::klass_offset_in_bytes() ); + if (ex_node->is_Phi()) { + ex_klass_node = new (C) PhiNode(ex_node->in(0), TypeKlassPtr::OBJECT); + for (uint i = 1; i < ex_node->req(); i++) { + Node* ex_in = ex_node->in(i); + if (ex_in == top() || ex_in == NULL) { + // This path was not taken. + ex_klass_node->init_req(i, top()); + continue; + } + Node* p = basic_plus_adr(ex_in, ex_in, oopDesc::klass_offset_in_bytes()); Node* k = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) ); ex_klass_node->init_req( i, k ); }