src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/library_call.cpp
src/share/vm/opto/library_call.cpp
Print this page
*** 2418,2433 ****
const TypePtr *adr_type = _gvn.type(adr)->isa_ptr();
// Try to categorize the address. If it comes up as TypeJavaPtr::BOTTOM,
// there was not enough information to nail it down.
Compile::AliasType* alias_type = C->alias_type(adr_type);
assert(alias_type->index() != Compile::AliasIdxBot, "no bare pointers here");
! assert(alias_type->adr_type() == TypeRawPtr::BOTTOM || alias_type->adr_type() == TypeOopPtr::BOTTOM ||
! alias_type->basic_type() != T_ILLEGAL, "field, array element or unknown");
bool mismatched = false;
- BasicType bt = alias_type->basic_type();
if (bt != T_ILLEGAL) {
if (bt == T_BYTE && adr_type->isa_aryptr()) {
// Alias type doesn't differentiate between byte[] and boolean[]).
// Use address type to get the element type.
bt = adr_type->is_aryptr()->elem()->array_element_basic_type();
--- 2418,2439 ----
const TypePtr *adr_type = _gvn.type(adr)->isa_ptr();
// Try to categorize the address. If it comes up as TypeJavaPtr::BOTTOM,
// there was not enough information to nail it down.
Compile::AliasType* alias_type = C->alias_type(adr_type);
+ BasicType bt = alias_type->basic_type();
+
assert(alias_type->index() != Compile::AliasIdxBot, "no bare pointers here");
! // Only field, array element or unknown locations are supported.
! if (alias_type->adr_type() != TypeRawPtr::BOTTOM &&
! alias_type->adr_type() != TypeOopPtr::BOTTOM &&
! bt == T_ILLEGAL) {
! return false;
! }
!
bool mismatched = false;
if (bt != T_ILLEGAL) {
if (bt == T_BYTE && adr_type->isa_aryptr()) {
// Alias type doesn't differentiate between byte[] and boolean[]).
// Use address type to get the element type.
bt = adr_type->is_aryptr()->elem()->array_element_basic_type();
*** 2812,2824 ****
offset = ConvL2X(offset);
Node* adr = make_unsafe_address(base, offset);
const TypePtr *adr_type = _gvn.type(adr)->isa_ptr();
Compile::AliasType* alias_type = C->alias_type(adr_type);
- assert(alias_type->adr_type() == TypeRawPtr::BOTTOM || alias_type->adr_type() == TypeOopPtr::BOTTOM ||
- alias_type->basic_type() != T_ILLEGAL, "field, array element or unknown");
BasicType bt = alias_type->basic_type();
if (bt != T_ILLEGAL &&
((bt == T_OBJECT || bt == T_ARRAY) != (type == T_OBJECT))) {
// Don't intrinsify mismatched object accesses.
return false;
}
--- 2818,2835 ----
offset = ConvL2X(offset);
Node* adr = make_unsafe_address(base, offset);
const TypePtr *adr_type = _gvn.type(adr)->isa_ptr();
Compile::AliasType* alias_type = C->alias_type(adr_type);
BasicType bt = alias_type->basic_type();
+
+ // Only field, array element or unknown locations are supported.
+ if (alias_type->adr_type() != TypeRawPtr::BOTTOM &&
+ alias_type->adr_type() != TypeOopPtr::BOTTOM &&
+ bt == T_ILLEGAL) {
+ return false;
+ }
if (bt != T_ILLEGAL &&
((bt == T_OBJECT || bt == T_ARRAY) != (type == T_OBJECT))) {
// Don't intrinsify mismatched object accesses.
return false;
}
src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File