an additional assert for fgValueNumberHelperCallFunc (#16789)
authorSergey Andreenko <seandree@microsoft.com>
Thu, 8 Mar 2018 00:51:56 +0000 (16:51 -0800)
committerGitHub <noreply@github.com>
Thu, 8 Mar 2018 00:51:56 +0000 (16:51 -0800)
src/jit/valuenum.cpp

index 3723ff4..5f7adf9 100644 (file)
@@ -7519,6 +7519,8 @@ void Compiler::fgValueNumberHelperCallFunc(GenTreeCall* call, VNFunc vnf, ValueN
         // Add the accumulated exceptions.
         call->gtVNPair = vnStore->VNPWithExc(call->gtVNPair, vnpExc);
     }
+    assert(args == nullptr ||
+           generateUniqueVN); // All arguments should be processed or we generate unique VN and do not care.
 }
 
 void Compiler::fgValueNumberCall(GenTreeCall* call)