Apply suggestion from @dean-long

Co-authored-by: Dean Long <17332032+dean-long@users.noreply.github.com>
This commit is contained in:
Quan Anh Mai 2026-02-04 10:41:44 +07:00 committed by GitHub
parent 616d639947
commit 6412ec87da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -557,8 +557,7 @@ bool MemNode::detect_ptr_independence(Node* p1, AllocateNode* a1,
// the allocation pattern) so joining the types only works if both are oops
const Type* p1_type = p1->bottom_type();
const Type* p2_type = p2->bottom_type();
const Type* join = p1_type->join(p2_type);
if (p1_type->isa_oopptr() && p2_type->isa_oopptr() && join->empty()) {
if (p1_type->isa_oopptr() && p2_type->isa_oopptr() && p1_type->join(p2_type)->empty()) {
return true;
}