From 0abf7ce610c3e71c39a894eb57948907fe71dc5f Mon Sep 17 00:00:00 2001 From: TIHan Date: Thu, 1 Dec 2022 12:12:48 -0800 Subject: [PATCH] Added byref to native int CAST on import --- src/coreclr/jit/importer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coreclr/jit/importer.cpp b/src/coreclr/jit/importer.cpp index 19e2c842393b54..5bc1afa502fc4a 100644 --- a/src/coreclr/jit/importer.cpp +++ b/src/coreclr/jit/importer.cpp @@ -2900,6 +2900,10 @@ GenTree* Compiler::impImplicitIorI4Cast(GenTree* tree, var_types dstTyp) tree = gtNewCastNode(TYP_INT, tree, false, TYP_INT); } #endif // TARGET_64BIT + else if ((wantedType == TYP_I_IMPL) && (currType == TYP_BYREF)) + { + tree = gtNewCastNode(TYP_I_IMPL, tree, false, TYP_I_IMPL); + } } return tree;