Skip to content

Commit

Permalink
8293844: C2: Verify Location::{oop,normal} types in PhaseOutput::Fill…
Browse files Browse the repository at this point in the history
…LocArray

Reviewed-by: kvn, dlong
  • Loading branch information
shipilev committed Sep 19, 2022
1 parent 357a2cc commit 26e08cf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/hotspot/share/opto/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,16 @@ void PhaseOutput::FillLocArray( int idx, MachSafePointNode* sfpt, Node *local,
t->base() == Type::VectorD || t->base() == Type::VectorX ||
t->base() == Type::VectorY || t->base() == Type::VectorZ) {
array->append(new_loc_value( C->regalloc(), regnum, Location::vector ));
} else if (C->regalloc()->is_oop(local)) {
assert(t->base() == Type::OopPtr || t->base() == Type::InstPtr ||
t->base() == Type::AryPtr,
"Unexpected type: %s", t->msg());
array->append(new_loc_value( C->regalloc(), regnum, Location::oop ));
} else {
array->append(new_loc_value( C->regalloc(), regnum, C->regalloc()->is_oop(local) ? Location::oop : Location::normal ));
assert(t->base() == Type::Int || t->base() == Type::Half ||
t->base() == Type::FloatCon || t->base() == Type::FloatBot,
"Unexpected type: %s", t->msg());
array->append(new_loc_value( C->regalloc(), regnum, Location::normal ));
}
return;
}
Expand Down

1 comment on commit 26e08cf

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.