From 6412ec87daa07d651b15005fca2a8117a19b9d8d Mon Sep 17 00:00:00 2001 From: Quan Anh Mai Date: Wed, 4 Feb 2026 10:41:44 +0700 Subject: [PATCH] Apply suggestion from @dean-long Co-authored-by: Dean Long <17332032+dean-long@users.noreply.github.com> --- src/hotspot/share/opto/memnode.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp index f56e09d86fe..7e84fcd8bb0 100644 --- a/src/hotspot/share/opto/memnode.cpp +++ b/src/hotspot/share/opto/memnode.cpp @@ -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; }