Skip to content

Commit 2474c62

Browse files
Delete dead code in the interpreter (#114890)
I think this is now unreachable since the first `if` check would cover this.
1 parent 628747e commit 2474c62

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -951,20 +951,6 @@ private Status TryScanMethod(MethodIL methodIL, Value[] parameters, Stack<Method
951951
return Status.Fail(methodIL.OwningMethod, opcode);
952952
}
953953
}
954-
else if (popped.ValueKind == StackValueKind.ByRef
955-
&& (opcode == ILOpcode.conv_i || opcode == ILOpcode.conv_u)
956-
&& (reader.PeekILOpcode() is (>= ILOpcode.ldind_i1 and <= ILOpcode.ldind_ref) or ILOpcode.ldobj))
957-
{
958-
// In the interpreter memory model, there's no conversion from a byref to an integer.
959-
// Roslyn however sometimes emits a sequence of conv_u followed by ldind and we can
960-
// have a narrow path to handle that one.
961-
//
962-
// For example:
963-
//
964-
// static unsafe U Read<T, U>(T val) where T : unmanaged where U : unmanaged => *(U*)&val;
965-
stack.Push(popped);
966-
goto again;
967-
}
968954
else
969955
{
970956
return Status.Fail(methodIL.OwningMethod, opcode);

0 commit comments

Comments
 (0)