From f9a92757413250fb6ef5675ddab8376231d575ab Mon Sep 17 00:00:00 2001 From: Brian Sullivan Date: Wed, 11 Apr 2018 16:15:57 -0700 Subject: Fixed checks for Avx/Avx2.InsertVector128 to check the type of the second arg Added test case JIT\HardwareIntrinsics\X86\Regression\GitHub_17435 --- src/jit/gentree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jit') 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; -- cgit v1.2.3