From 305d83d45c72bd20bfc48eb3892d175fbc795e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Petryka?= <35800402+MichalPetryka@users.noreply.github.com> Date: Fri, 21 Jul 2023 22:04:49 +0200 Subject: [PATCH] Avoid BYREF trees in ByteOffset Solves the particular problematic case from #84291. --- src/coreclr/jit/importercalls.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coreclr/jit/importercalls.cpp b/src/coreclr/jit/importercalls.cpp index df1df1c881c73..a01a76c6e1b1b 100644 --- a/src/coreclr/jit/importercalls.cpp +++ b/src/coreclr/jit/importercalls.cpp @@ -4229,8 +4229,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: