summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2018-04-11 16:15:57 -0700
committerBrian Sullivan <briansul@microsoft.com>2018-04-11 16:15:57 -0700
commitf9a92757413250fb6ef5675ddab8376231d575ab (patch)
tree9bb68f2362081b8f5ab0d195ec393c3f5b3ccf7d /src
parent7267a57b5ee37af31538e2141d21ff557d54dd00 (diff)
downloadcoreclr-f9a92757413250fb6ef5675ddab8376231d575ab.tar.gz
coreclr-f9a92757413250fb6ef5675ddab8376231d575ab.tar.bz2
coreclr-f9a92757413250fb6ef5675ddab8376231d575ab.zip
Fixed checks for Avx/Avx2.InsertVector128 to check the type of the second arg
Added test case JIT\HardwareIntrinsics\X86\Regression\GitHub_17435
Diffstat (limited to 'src')
-rw-r--r--src/jit/gentree.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jit/gentree.cpp b/src/jit/gentree.cpp
index 3846b2ea7e..d3234036e3 100644
--- a/src/jit/gentree.cpp
+++ b/src/jit/gentree.cpp
@@ -18252,7 +18252,7 @@ bool GenTreeHWIntrinsic::OperIsMemoryLoad()
GenTreeArgList* argList = gtOp.gtOp1->AsArgList();
if ((gtHWIntrinsicId == NI_AVX_InsertVector128 || gtHWIntrinsicId == NI_AVX2_InsertVector128) &&
- (argList->Current()->TypeGet() == TYP_I_IMPL)) // Is the type of the first arg TYP_I_IMPL?
+ (argList->Rest()->Current()->TypeGet() == TYP_I_IMPL)) // Is the type of the second arg TYP_I_IMPL?
{
// This is Avx/Avx2.InsertVector128
return true;
@@ -18319,7 +18319,7 @@ bool GenTreeHWIntrinsic::OperIsMemoryLoadOrStore()
GenTreeArgList* argList = gtOp.gtOp1->AsArgList();
if ((gtHWIntrinsicId == NI_AVX_InsertVector128 || gtHWIntrinsicId == NI_AVX2_InsertVector128) &&
- (argList->Current()->TypeGet() == TYP_I_IMPL)) // Is the type of the first arg TYP_I_IMPL?
+ (argList->Rest()->Current()->TypeGet() == TYP_I_IMPL)) // Is the type of the second arg TYP_I_IMPL?
{
// This is Avx/Avx2.InsertVector128
return true;