From 7fbc11c3de19499481c175b3430d75e8f372e60e Mon Sep 17 00:00:00 2001 From: Abdulrahman Alattas Date: Wed, 15 Jan 2025 13:51:13 -0500 Subject: [PATCH] Use correct arrayBaseNode in BoolArrayStoreTransformer for OffHeap --- runtime/compiler/optimizer/BoolArrayStoreTransformer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runtime/compiler/optimizer/BoolArrayStoreTransformer.cpp b/runtime/compiler/optimizer/BoolArrayStoreTransformer.cpp index 3484e548388..ca8f29c42cb 100644 --- a/runtime/compiler/optimizer/BoolArrayStoreTransformer.cpp +++ b/runtime/compiler/optimizer/BoolArrayStoreTransformer.cpp @@ -728,6 +728,10 @@ void TR_BoolArrayStoreTransformer::transformUnknownTypeArrayStore() TR::Node *bstoreiNode = *it; dumpOptDetails(comp(), "%s transform value child of bstorei node of unknown type n%dn\n", OPT_DETAILS, bstoreiNode->getGlobalIndex()); TR::Node *arrayBaseNode = bstoreiNode->getFirstChild()->getFirstChild(); +#if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION) + if (arrayBaseNode->isDataAddrPointer()) + arrayBaseNode = arrayBaseNode->getFirstChild(); +#endif /* J9VM_GC_SPARSE_HEAP_ALLOCATION */ TR::Node *vft = TR::Node::createWithSymRef(TR::aloadi, 1, 1, arrayBaseNode, comp()->getSymRefTab()->findOrCreateVftSymbolRef()); TR::Node *aconstNode = TR::Node::aconst(bstoreiNode, j9class); aconstNode->setIsClassPointerConstant(true);