src/share/vm/opto/cfgnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8153357 Cdiff src/share/vm/opto/cfgnode.cpp
src/share/vm/opto/cfgnode.cpp
Print this page
*** 1701,1720 ****
}
}
}
if (uncasted) {
! // Wait until after parsing for the type information to propagate from the casts
assert(can_reshape, "Invalid during parsing");
const Type* phi_type = bottom_type();
assert(phi_type->isa_int() || phi_type->isa_ptr(), "bad phi type");
int opcode;
if (phi_type->isa_int()) {
opcode = Op_CastII;
} else {
const Type* uin_type = phase->type(uin);
! if (phi_type->join(TypePtr::NOTNULL) == uin_type->join(TypePtr::NOTNULL)) {
opcode = Op_CastPP;
} else {
opcode = Op_CheckCastPP;
}
}
--- 1701,1723 ----
}
}
}
if (uncasted) {
! // Add a cast node between the phi to be removed and its unique input.
! // Wait until after parsing for the type information to propagate from the casts.
assert(can_reshape, "Invalid during parsing");
const Type* phi_type = bottom_type();
assert(phi_type->isa_int() || phi_type->isa_ptr(), "bad phi type");
int opcode;
+ // Determine the type of cast to be added.
if (phi_type->isa_int()) {
opcode = Op_CastII;
} else {
const Type* uin_type = phase->type(uin);
! if ((phi_type->join(TypePtr::NOTNULL) == uin_type->join(TypePtr::NOTNULL)) ||
! (phi_type->isa_klassptr() && uin_type->isa_klassptr())) {
opcode = Op_CastPP;
} else {
opcode = Op_CheckCastPP;
}
}
src/share/vm/opto/cfgnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File