summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2017-02-13 18:38:14 -0800
committerAndy Ayers <andya@microsoft.com>2017-02-13 18:38:14 -0800
commitde8cad748bcd1f1a1bc2bcbc9ce5db154023c4a6 (patch)
tree848befea943358e881a8026e79b28b5fdc0d4836
parent539b142c53c66702fd9e76335f591dd946ddbdd5 (diff)
downloadcoreclr-de8cad748bcd1f1a1bc2bcbc9ce5db154023c4a6.tar.gz
coreclr-de8cad748bcd1f1a1bc2bcbc9ce5db154023c4a6.tar.bz2
coreclr-de8cad748bcd1f1a1bc2bcbc9ce5db154023c4a6.zip
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.
-rw-r--r--src/jit/compiler.h3
1 files changed, 2 insertions, 1 deletions
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);
}
//-------------------------------------------------------------------------