From 097df3ff327fad2df46deaa1f73419cf1b9318b3 Mon Sep 17 00:00:00 2001 From: Adam Perlin Date: Fri, 4 Sep 2026 16:34:13 -0700 Subject: [PATCH] Use call's struct type in Wasm abi classifier instead of block store consumer's type in LowerStoreSingleRegCallStruct --- src/coreclr/jit/lower.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/coreclr/jit/lower.cpp b/src/coreclr/jit/lower.cpp index d425a72e33f760..65efdbf479e06f 100644 --- a/src/coreclr/jit/lower.cpp +++ b/src/coreclr/jit/lower.cpp @@ -6279,13 +6279,9 @@ void Lowering::LowerStoreSingleRegCallStruct(GenTreeBlk* store) #endif #if defined(TARGET_WASM) - CORINFO_CLASS_HANDLE clsHnd = layout->GetClassHandle(); - if (clsHnd != NO_CLASS_HANDLE) - { - CorInfoWasmType wasmAbiType = m_compiler->info.compCompHnd->getWasmLowering(clsHnd); - assert(wasmAbiType != CORINFO_WASM_TYPE_VOID); - regType = WasmClassifier::ToJitType(wasmAbiType); - } + CorInfoWasmType wasmAbiType = m_compiler->info.compCompHnd->getWasmLowering(call->gtRetClsHnd); + assert(wasmAbiType != CORINFO_WASM_TYPE_VOID); + regType = WasmClassifier::ToJitType(wasmAbiType); #endif // TARGET_WASM store->ChangeType(regType);