diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2019-10-14 13:23:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-14 13:23:46 -0700 |
commit | 1a4112735fc9325fcbc816c4f3515290329d9e7c (patch) | |
tree | 5f44dbee35023136e11436414b4633a93a0f224f | |
parent | bf94cab3387eb235e339c22f251122d582b0cd46 (diff) | |
download | coreclr-1a4112735fc9325fcbc816c4f3515290329d9e7c.tar.gz coreclr-1a4112735fc9325fcbc816c4f3515290329d9e7c.tar.bz2 coreclr-1a4112735fc9325fcbc816c4f3515290329d9e7c.zip |
Correctly handle variable argument SIMDScalar (#26421) (#26778)
* Correctly handle variable argument SIMDScalar
Fix #26286
-rw-r--r-- | src/jit/hwintrinsiccodegenxarch.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/jit/hwintrinsiccodegenxarch.cpp b/src/jit/hwintrinsiccodegenxarch.cpp index 42dba8250a..84d1fd36f3 100644 --- a/src/jit/hwintrinsiccodegenxarch.cpp +++ b/src/jit/hwintrinsiccodegenxarch.cpp @@ -125,7 +125,16 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) if ((ival != -1) && varTypeIsFloating(baseType)) { assert((ival >= 0) && (ival <= 127)); - genHWIntrinsic_R_RM_I(node, ins, (int8_t)ival); + if ((category == HW_Category_SIMDScalar) && HWIntrinsicInfo::CopiesUpperBits(intrinsicId)) + { + assert(!op1->isContained()); + emit->emitIns_SIMD_R_R_R_I(ins, simdSize, targetReg, op1Reg, op1Reg, + static_cast<int8_t>(ival)); + } + else + { + genHWIntrinsic_R_RM_I(node, ins, static_cast<int8_t>(ival)); + } } else if ((category == HW_Category_SIMDScalar) && HWIntrinsicInfo::CopiesUpperBits(intrinsicId)) { |