Skip to content

Commit bca838d

Browse files
committed
8374786: [lworld] C2: Missing asserts in parse3.cpp after merging JDK-8341411
1 parent 093d033 commit bca838d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/hotspot/share/opto/parse3.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ void Parse::do_get_xxx(Node* obj, ciField* field) {
148148
int offset = field->offset_in_bytes();
149149
bool must_assert_null = false;
150150
Node* adr = basic_plus_adr(obj, obj, offset);
151+
assert(C->get_alias_index(C->alias_type(field)->adr_type()) == C->get_alias_index(_gvn.type(adr)->isa_ptr()),
152+
"slice of address and input slice don't match");
151153

152154
Node* ld = nullptr;
153155
if (field->is_null_free() && field_klass->as_inline_klass()->is_empty()) {
@@ -299,6 +301,8 @@ void Parse::do_put_xxx(Node* obj, ciField* field, bool is_field) {
299301
}
300302

301303
const TypePtr* adr_type = C->alias_type(field)->adr_type();
304+
assert(C->get_alias_index(adr_type) == C->get_alias_index(_gvn.type(adr)->isa_ptr()),
305+
"slice of address and input slice don't match");
302306
DecoratorSet decorators = IN_HEAP;
303307
decorators |= is_vol ? MO_SEQ_CST : MO_UNORDERED;
304308
inc_sp(1);

0 commit comments

Comments
 (0)