From: sivarv Date: Tue, 18 Oct 2016 00:20:30 +0000 (-0700) Subject: Vector.ctor(T val) is not recognized for ubyte/byte/short/ushort X-Git-Tag: submit/tizen/20210909.063632~11030^2~9151^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7294acfe60984d70dcbd6ba50beec80d1d23a582;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Vector.ctor(T val) is not recognized for ubyte/byte/short/ushort when the arg is a local of small int type (e.g. method args). Commit migrated from https://github.com/dotnet/coreclr/commit/2632e674b99f189b44050ac3acd6739d63b23b95 --- diff --git a/src/coreclr/src/jit/simd.cpp b/src/coreclr/src/jit/simd.cpp index 1f0c867..a9450b7 100644 --- a/src/coreclr/src/jit/simd.cpp +++ b/src/coreclr/src/jit/simd.cpp @@ -525,7 +525,8 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in // We don't check anything in that case. if (!isThisPtr || !isNewObj) { - GenTreePtr arg = impStackTop(stackIndex).val; + GenTreePtr arg = impStackTop(stackIndex).val; + var_types argType = arg->TypeGet(); var_types expectedArgType; if (argIndex < fixedArgCnt) @@ -540,6 +541,7 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in { // The type of the argument will be genActualType(*baseType). expectedArgType = genActualType(*baseType); + argType = genActualType(argType); } } else @@ -547,7 +549,6 @@ const SIMDIntrinsicInfo* Compiler::getSIMDIntrinsicInfo(CORINFO_CLASS_HANDLE* in expectedArgType = *baseType; } - var_types argType = arg->TypeGet(); if (!isThisPtr && argType == TYP_I_IMPL) { // The reference implementation has a constructor that takes a pointer.