Recognize Vector<T> constructors for small ints
authorCarol Eidt <carol.eidt@microsoft.com>
Thu, 26 May 2016 22:53:14 +0000 (15:53 -0700)
committerCarol Eidt <carol.eidt@microsoft.com>
Thu, 26 May 2016 22:53:14 +0000 (15:53 -0700)
Fix dotnet/coreclr#5116

Commit migrated from https://github.com/dotnet/coreclr/commit/a755577a23db6b33c87791495cab7f9d3d1faf00

src/coreclr/src/jit/simd.cpp

index 122972a..4536f6d 100644 (file)
@@ -540,8 +540,8 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE*  i
                         assert(expectedArgType != TYP_UNDEF);
                         if (expectedArgType == TYP_UNKNOWN)
                         {
-                            // JIT maps uint/ulong type vars to TYP_INT/TYP_LONG.                            
-                            expectedArgType = (*baseType == TYP_UINT || *baseType == TYP_ULONG) ? genActualType(*baseType) : *baseType;
+                            // The type of the argument will be genActualType(*baseType).                            
+                            expectedArgType = genActualType(*baseType);
                         }
                     }
                     else