Avoid BYREF trees in ByteOffset (#89324)
authorMichał Petryka <35800402+MichalPetryka@users.noreply.github.com>
Mon, 24 Jul 2023 08:50:31 +0000 (10:50 +0200)
committerGitHub <noreply@github.com>
Mon, 24 Jul 2023 08:50:31 +0000 (10:50 +0200)
Solves the particular problematic case from #84291.

src/coreclr/jit/importercalls.cpp

index 7ab127f..017d5c1 100644 (file)
@@ -4218,8 +4218,7 @@ GenTree* Compiler::impSRCSUnsafeIntrinsic(NamedIntrinsic          intrinsic,
             GenTree* op1 = impPopStack().val;
             impBashVarAddrsToI(op1, op2);
 
-            var_types type = impGetByRefResultType(GT_SUB, /* uns */ false, &op2, &op1);
-            return gtNewOperNode(GT_SUB, type, op2, op1);
+            return gtNewOperNode(GT_SUB, TYP_I_IMPL, op2, op1);
         }
 
         case NI_SRCS_UNSAFE_Copy: