Fix condition for mustExpand flag (#14590)
authorJan Kotas <jkotas@microsoft.com>
Thu, 19 Oct 2017 21:20:03 +0000 (14:20 -0700)
committerGitHub <noreply@github.com>
Thu, 19 Oct 2017 21:20:03 +0000 (14:20 -0700)
The flag was getting overwritten when both CORINFO_FLG_INTRINSIC and CORINFO_FLG_JIT_INTRINSIC are set

src/jit/importer.cpp

index 5bbf9c6..6429978 100644 (file)
@@ -3353,7 +3353,7 @@ GenTree* Compiler::impIntrinsic(GenTree*                newobjThis,
     if ((methodFlags & CORINFO_FLG_JIT_INTRINSIC) != 0)
     {
         // The recursive calls to Jit intrinsics are must-expand by convention.
-        mustExpand = gtIsRecursiveCall(method);
+        mustExpand = mustExpand || gtIsRecursiveCall(method);
     }
 
     *pIntrinsicID = intrinsicID;