diff --git a/src/coreclr/jit/utils.cpp b/src/coreclr/jit/utils.cpp index 3f3b49dc55b933..86300e47383b0f 100644 --- a/src/coreclr/jit/utils.cpp +++ b/src/coreclr/jit/utils.cpp @@ -1596,9 +1596,12 @@ void HelperCallProperties::init() break; // GETREFANY is pure up to the value of the struct argument. We - // only support that when it is not an implicit byref. + // only support that when it is not an implicit byref. The + // TypedReference struct (two pointers) is passed by implicit + // byref on win-x64 and on wasm (the wasm ABI passes any struct + // without a single scalar lowering by reference). case CORINFO_HELP_GETREFANY: -#ifndef WINDOWS_AMD64_ABI +#if !defined(WINDOWS_AMD64_ABI) && !defined(TARGET_WASM) isPure = true; #endif break;