Fix assertion in lvaIsImplicitByRefLocal
authorJoseph Tremoulet <jotrem@microsoft.com>
Fri, 7 Apr 2017 17:55:42 +0000 (13:55 -0400)
committerJoseph Tremoulet <jotrem@microsoft.com>
Tue, 16 May 2017 00:01:19 +0000 (20:01 -0400)
The check for struct types needs to match the check in
lvMarkImplicitByRefLocals, which uses varTypeIsStruct (and therefore
includes SIMD types), instead of just using TYP_STRUCT.

src/jit/compiler.h

index bc4ec93..81adcf0 100644 (file)
@@ -2668,7 +2668,7 @@ public:
         LclVarDsc* varDsc = &(lvaTable[varNum]);
         if (varDsc->lvIsParam && varDsc->lvIsTemp)
         {
-            assert((varDsc->lvType == TYP_STRUCT) || (varDsc->lvType == TYP_BYREF));
+            assert(varTypeIsStruct(varDsc) || (varDsc->lvType == TYP_BYREF));
             return true;
         }
 #endif // defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)