Ensure we account for intrinsics which have gtType=TYP_SIMD16 but gtSIMDSize=32 ...
authorTanner Gooding <tagoo@outlook.com>
Thu, 7 May 2020 00:54:27 +0000 (17:54 -0700)
committerGitHub <noreply@github.com>
Thu, 7 May 2020 00:54:27 +0000 (17:54 -0700)
src/coreclr/src/jit/lower.cpp

index 9389b21..16a0ee7 100644 (file)
@@ -1334,7 +1334,13 @@ void Lowering::LowerArg(GenTreeCall* call, GenTree** ppArg)
         else if (arg->OperIs(GT_SIMD, GT_HWINTRINSIC))
         {
             GenTreeJitIntrinsic* jitIntrinsic = reinterpret_cast<GenTreeJitIntrinsic*>(arg);
-            assert((jitIntrinsic->gtSIMDSize == 12) || (jitIntrinsic->gtSIMDSize == 16));
+
+            // For HWIntrinsic, there are some intrinsics like ExtractVector128 which have
+            // a gtType of TYP_SIMD16 but a gtSIMDSize of 32, so we need to include that in
+            // the assert below.
+
+            assert((jitIntrinsic->gtSIMDSize == 12) || (jitIntrinsic->gtSIMDSize == 16) ||
+                   (jitIntrinsic->gtSIMDSize == 32));
 
             if (jitIntrinsic->gtSIMDSize == 12)
             {