summaryrefslogtreecommitdiff
path: root/src/jit/hwintrinsicxarch.h
diff options
context:
space:
mode:
authorTanner Gooding <tagoo@outlook.com>2019-04-29 14:39:19 -0700
committerGitHub <noreply@github.com>2019-04-29 14:39:19 -0700
commit54af92b34fc18ee9d8adada35d1f527c67224be7 (patch)
tree6fe82e8dcbbdfc65432349681f40f6356577e884 /src/jit/hwintrinsicxarch.h
parente3f602bb27a5798115a016b282ae6ab87c0decdc (diff)
downloadcoreclr-54af92b34fc18ee9d8adada35d1f527c67224be7.tar.gz
coreclr-54af92b34fc18ee9d8adada35d1f527c67224be7.tar.bz2
coreclr-54af92b34fc18ee9d8adada35d1f527c67224be7.zip
Resolves an assert around Sse41.ConvertToVector128Int* and Avx2.ConvertToVector256Int* (#24289)
* Adding tests for the overloads of Sse41.ConvertToVector128Int* and Avx2.ConvertToVector256Int* that take a pointer * Fixing the handling of Sse41.ConvertToVector128* and Avx2.ConvertToVector256*
Diffstat (limited to 'src/jit/hwintrinsicxarch.h')
-rw-r--r--src/jit/hwintrinsicxarch.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jit/hwintrinsicxarch.h b/src/jit/hwintrinsicxarch.h
index 30a4d9bddb..d4469e7a2e 100644
--- a/src/jit/hwintrinsicxarch.h
+++ b/src/jit/hwintrinsicxarch.h
@@ -178,7 +178,11 @@ struct HWIntrinsicInfo
static instruction lookupIns(NamedIntrinsic id, var_types type)
{
- assert((type >= TYP_BYTE) && (type <= TYP_DOUBLE));
+ if ((type < TYP_BYTE) || (type > TYP_DOUBLE))
+ {
+ assert(!"Unexpected type");
+ return INS_invalid;
+ }
return lookup(id).ins[type - TYP_BYTE];
}