diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs index 847485fdfb0fe5..b87f12c6e1cce5 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs @@ -951,20 +951,6 @@ private Status TryScanMethod(MethodIL methodIL, Value[] parameters, Stack= ILOpcode.ldind_i1 and <= ILOpcode.ldind_ref) or ILOpcode.ldobj)) - { - // In the interpreter memory model, there's no conversion from a byref to an integer. - // Roslyn however sometimes emits a sequence of conv_u followed by ldind and we can - // have a narrow path to handle that one. - // - // For example: - // - // static unsafe U Read(T val) where T : unmanaged where U : unmanaged => *(U*)&val; - stack.Push(popped); - goto again; - } else { return Status.Fail(methodIL.OwningMethod, opcode);