From de8cad748bcd1f1a1bc2bcbc9ce5db154023c4a6 Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Mon, 13 Feb 2017 18:38:14 -0800 Subject: Jit: fix gtIsRecursiveCall When called from the inline compiler, this needs to look at the root method's handle, not the inlined method's handle. Fixes #9568. --- src/jit/compiler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jit/compiler.h b/src/jit/compiler.h index 7c5565c9c7..259c4cb049 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -2138,9 +2138,10 @@ public: bool gtIsStaticFieldPtrToBoxedStruct(var_types fieldNodeType, CORINFO_FIELD_HANDLE fldHnd); // 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) { - return (call->gtCallMethHnd == info.compMethodHnd); + return (call->gtCallMethHnd == impInlineRoot()->info.compMethodHnd); } //------------------------------------------------------------------------- -- cgit v1.2.3