Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -3827,6 +3827,7 @@ class Compiler
NamedIntrinsic intrinsicName,
bool tailCall);
NamedIntrinsic lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method);
NamedIntrinsic lookupPrimitiveNamedIntrinsic(CORINFO_METHOD_HANDLE method, const char* methodName);
GenTree* impUnsupportedNamedIntrinsic(unsigned helper,
CORINFO_METHOD_HANDLE method,
CORINFO_SIG_INFO* sig,
Expand All @@ -3837,6 +3838,11 @@ class Compiler
CORINFO_METHOD_HANDLE method,
CORINFO_SIG_INFO* sig);

GenTree* impPrimitiveNamedIntrinsic(NamedIntrinsic intrinsic,
CORINFO_CLASS_HANDLE clsHnd,
CORINFO_METHOD_HANDLE method,
CORINFO_SIG_INFO* sig);

#ifdef FEATURE_HW_INTRINSICS
GenTree* impHWIntrinsic(NamedIntrinsic intrinsic,
CORINFO_CLASS_HANDLE clsHnd,
Expand Down
21 changes: 20 additions & 1 deletion src/coreclr/jit/fgbasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,16 +1167,23 @@ void Compiler::fgFindJumpTargets(const BYTE* codeAddr, IL_OFFSET codeSize, Fixed
break;

// These are foldable if the first argument is a constant
case NI_PRIMITIVE_LeadingZeroCount:
case NI_PRIMITIVE_Log2:
case NI_PRIMITIVE_PopCount:
case NI_PRIMITIVE_TrailingZeroCount:
case NI_System_Type_get_IsEnum:
case NI_System_Type_GetEnumUnderlyingType:
case NI_System_Type_get_IsValueType:
case NI_System_Type_get_IsByRefLike:
case NI_System_Type_GetTypeFromHandle:
case NI_System_String_get_Length:
case NI_System_Buffers_Binary_BinaryPrimitives_ReverseEndianness:
case NI_System_Numerics_BitOperations_PopCount:
#if defined(FEATURE_HW_INTRINSICS)
#if defined(TARGET_ARM64)
case NI_ArmBase_Arm64_LeadingZeroCount:
case NI_ArmBase_Arm64_ReverseElementBits:
case NI_ArmBase_LeadingZeroCount:
case NI_ArmBase_ReverseElementBits:
case NI_Vector64_Create:
case NI_Vector64_CreateScalar:
case NI_Vector64_CreateScalarUnsafe:
Expand All @@ -1195,10 +1202,20 @@ void Compiler::fgFindJumpTargets(const BYTE* codeAddr, IL_OFFSET codeSize, Fixed
case NI_Vector128_CreateScalarUnsafe:
case NI_VectorT128_CreateBroadcast:
#if defined(TARGET_XARCH)
case NI_BMI1_TrailingZeroCount:
case NI_BMI1_X64_TrailingZeroCount:
case NI_LZCNT_LeadingZeroCount:
case NI_LZCNT_X64_LeadingZeroCount:
case NI_POPCNT_PopCount:
case NI_POPCNT_X64_PopCount:
case NI_Vector256_Create:
case NI_Vector256_CreateScalar:
case NI_Vector256_CreateScalarUnsafe:
case NI_VectorT256_CreateBroadcast:
case NI_X86Base_BitScanForward:
case NI_X86Base_X64_BitScanForward:
case NI_X86Base_BitScanReverse:
case NI_X86Base_X64_BitScanReverse:
#endif // TARGET_XARCH
#endif // FEATURE_HW_INTRINSICS
{
Expand All @@ -1211,6 +1228,8 @@ void Compiler::fgFindJumpTargets(const BYTE* codeAddr, IL_OFFSET codeSize, Fixed
}

// These are foldable if two arguments are constants
case NI_PRIMITIVE_RotateLeft:
case NI_PRIMITIVE_RotateRight:
case NI_System_Type_op_Equality:
case NI_System_Type_op_Inequality:
case NI_System_String_get_Chars:
Expand Down
Loading