Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove redundant intrinsics
  • Loading branch information
EgorBo committed Dec 25, 2020
commit 8cdda9bed6565822f9a162862530d2c02be7b082
12 changes: 1 addition & 11 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4319,8 +4319,6 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
}

case NI_System_MemoryExtensions_Equals:
case NI_System_MemoryExtensions_EqualsOrdinal:
case NI_System_MemoryExtensions_EqualsOrdinalIgnoreCase:
case NI_System_MemoryExtensions_SequenceEqual:
case NI_System_MemoryExtensions_StartsWith:
{
Expand All @@ -4338,7 +4336,7 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis,
//
GenTree* arg0 = impStackTop(sig->numArgs - 1).val;
GenTree* arg1 = impStackTop(sig->numArgs - 2).val;
bool ignoreCase = (ni == NI_System_MemoryExtensions_EqualsOrdinalIgnoreCase);
bool ignoreCase = false;

if ((sig->numArgs == 3) && impStackTop(0).val->IsCnsIntOrI())
{
Expand Down Expand Up @@ -5082,14 +5080,6 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
{
result = NI_System_MemoryExtensions_Equals;
}
else if (strcmp(methodName, "EqualsOrdinal") == 0)
{
result = NI_System_MemoryExtensions_EqualsOrdinal;
}
else if (strcmp(methodName, "EqualsOrdinalIgnoreCase") == 0)
{
result = NI_System_MemoryExtensions_EqualsOrdinalIgnoreCase;
}
}
else if (strcmp(className, "String") == 0)
{
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/jit/namedintrinsiclist.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ enum NamedIntrinsic : unsigned short
NI_System_Type_IsAssignableTo,
NI_System_Array_Clone,
NI_System_MemoryExtensions_Equals,
NI_System_MemoryExtensions_EqualsOrdinal,
NI_System_MemoryExtensions_EqualsOrdinalIgnoreCase,
NI_System_MemoryExtensions_StartsWith,
NI_System_MemoryExtensions_SequenceEqual,
NI_System_String_op_Implicit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public static bool Equals(this ReadOnlySpan<char> span, ReadOnlySpan<char> other
}
}

[Intrinsic]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static bool EqualsOrdinal(this ReadOnlySpan<char> span, ReadOnlySpan<char> value)
{
Expand All @@ -78,7 +77,6 @@ internal static bool EqualsOrdinal(this ReadOnlySpan<char> span, ReadOnlySpan<ch
return span.SequenceEqual(value);
}

[Intrinsic]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static bool EqualsOrdinalIgnoreCase(this ReadOnlySpan<char> span, ReadOnlySpan<char> value)
{
Expand Down