From 9581dbb64936523a778e94c3c9b84e94752003cd Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Fri, 21 Apr 2017 17:09:07 -0700 Subject: [PATCH] JIT: simple fix for the tail call stress assert If class handles match, the return types are compatible, no matter what the jit types indicate. Addresses dotnet/coreclr#10047. Commit migrated from https://github.com/dotnet/coreclr/commit/f0acfab2c5ecf7896b4f83bd8988fde0779dd849 --- src/coreclr/src/jit/importer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp index 2e3ca81..c954ad5 100644 --- a/src/coreclr/src/jit/importer.cpp +++ b/src/coreclr/src/jit/importer.cpp @@ -6216,6 +6216,12 @@ bool Compiler::impTailCallRetTypeCompatible(var_types callerRetType, return true; } + // If the class handles are the same and not null, the return types are compatible. + if ((callerRetTypeClass != nullptr) && (callerRetTypeClass == calleeRetTypeClass)) + { + return true; + } + #if defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_) // Jit64 compat: if (callerRetType == TYP_VOID) -- 2.7.4