src/share/vm/opto/callnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/callnode.cpp
src/share/vm/opto/callnode.cpp
Print this page
rev 6579 : 8046698: assert(false) failed: only Initialize or AddP expected macro.cpp:943
Summary: PhiNode inserted between AllocateNode and Initialization node confuses allocation elimination
Reviewed-by:
*** 776,786 ****
}
return false;
}
// Returns the unique CheckCastPP of a call
! // or 'this' if there are several CheckCastPP
// or returns NULL if there is no one.
Node *CallNode::result_cast() {
Node *cast = NULL;
Node *p = proj_out(TypeFunc::Parms);
--- 776,786 ----
}
return false;
}
// Returns the unique CheckCastPP of a call
! // or 'this' if there are several CheckCastPP or unexpected uses
// or returns NULL if there is no one.
Node *CallNode::result_cast() {
Node *cast = NULL;
Node *p = proj_out(TypeFunc::Parms);
*** 792,801 ****
--- 792,808 ----
if (use->is_CheckCastPP()) {
if (cast != NULL) {
return this; // more than 1 CheckCastPP
}
cast = use;
+ } else if (!use->is_Initialize() &&
+ !use->is_AddP()) {
+ // Expected uses are restricted to a CheckCastPP, an Initialize
+ // node, and AddP nodes. If we encounter any other use (a Phi
+ // node can be seen in rare cases) return this to prevent
+ // incorrect optimizations.
+ return this;
}
}
return cast;
}
src/share/vm/opto/callnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File