diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 3b17dfa13638d..5dca9aa7f5e32 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -3625,14 +3625,18 @@ class Compiler // Return true if call is a recursive call; return false otherwise. // Note when inlining, this looks for calls back to the root method. - bool gtIsRecursiveCall(GenTreeCall* call) + bool gtIsRecursiveCall(GenTreeCall* call, bool useInlineRoot = true) { - return gtIsRecursiveCall(call->gtCallMethHnd); + return gtIsRecursiveCall(call->gtCallMethHnd, useInlineRoot); } - bool gtIsRecursiveCall(CORINFO_METHOD_HANDLE callMethodHandle) + bool gtIsRecursiveCall(CORINFO_METHOD_HANDLE callMethodHandle, bool useInlineRoot = true) { - return (callMethodHandle == impInlineRoot()->info.compMethodHnd); + if (useInlineRoot) + { + return callMethodHandle == impInlineRoot()->info.compMethodHnd; + } + return callMethodHandle == info.compMethodHnd; } //------------------------------------------------------------------------- diff --git a/src/coreclr/jit/hwintrinsic.cpp b/src/coreclr/jit/hwintrinsic.cpp index ac5d6185d41bf..26af49073c5d6 100644 --- a/src/coreclr/jit/hwintrinsic.cpp +++ b/src/coreclr/jit/hwintrinsic.cpp @@ -835,7 +835,7 @@ GenTree* Compiler::addRangeCheckIfNeeded( ) { assert(!immOp->IsCnsIntOrI()); - assert(varTypeIsUnsigned(immOp)); + assert(varTypeIsIntegral(immOp)); return addRangeCheckForHWIntrinsic(immOp, immLowerBound, immUpperBound); } diff --git a/src/coreclr/jit/importercalls.cpp b/src/coreclr/jit/importercalls.cpp index c640105ec3a06..59a3fadf40f1e 100644 --- a/src/coreclr/jit/importercalls.cpp +++ b/src/coreclr/jit/importercalls.cpp @@ -2886,7 +2886,7 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, if (isIntrinsic) { // The recursive non-virtual calls to Jit intrinsics are must-expand by convention. - mustExpand = gtIsRecursiveCall(method) && !(methodFlags & CORINFO_FLG_VIRTUAL); + mustExpand = gtIsRecursiveCall(method, false) && !(methodFlags & CORINFO_FLG_VIRTUAL); } else { @@ -10135,7 +10135,7 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) assert(strcmp(className, "Vector`1") == 0); result = NI_Vector_GetCount; } - else if (gtIsRecursiveCall(method)) + else if (gtIsRecursiveCall(method, false)) { // For the framework itself, any recursive intrinsics will either be // only supported on a single platform or will be guarded by a relevant @@ -10370,7 +10370,7 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method) result = NI_Vector_GetCount; } - else if (gtIsRecursiveCall(method)) + else if (gtIsRecursiveCall(method, false)) { // For the framework itself, any recursive intrinsics will either be // only supported on a single platform or will be guarded by a relevant diff --git a/src/libraries/System.Private.CoreLib/src/System/Type.cs b/src/libraries/System.Private.CoreLib/src/System/Type.cs index 7281867487a08..c93a158339a03 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Type.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Type.cs @@ -127,20 +127,12 @@ public virtual Type[] GetGenericParameterConstraints() protected virtual bool IsMarshalByRefImpl() => false; public bool IsPrimitive { -#if NATIVEAOT - // https://github.com/dotnet/runtime/issues/97272 - [MethodImpl(MethodImplOptions.NoOptimization)] -#endif [Intrinsic] get => IsPrimitiveImpl(); } protected abstract bool IsPrimitiveImpl(); public bool IsValueType { -#if NATIVEAOT - // https://github.com/dotnet/runtime/issues/97272 - [MethodImpl(MethodImplOptions.NoOptimization)] -#endif [Intrinsic] get => IsValueTypeImpl(); }