Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 1a41127

Browse files
authored
Correctly handle variable argument SIMDScalar (#26421) (#26778)
* Correctly handle variable argument SIMDScalar Fix #26286
1 parent bf94cab commit 1a41127

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/jit/hwintrinsiccodegenxarch.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,16 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node)
125125
if ((ival != -1) && varTypeIsFloating(baseType))
126126
{
127127
assert((ival >= 0) && (ival <= 127));
128-
genHWIntrinsic_R_RM_I(node, ins, (int8_t)ival);
128+
if ((category == HW_Category_SIMDScalar) && HWIntrinsicInfo::CopiesUpperBits(intrinsicId))
129+
{
130+
assert(!op1->isContained());
131+
emit->emitIns_SIMD_R_R_R_I(ins, simdSize, targetReg, op1Reg, op1Reg,
132+
static_cast<int8_t>(ival));
133+
}
134+
else
135+
{
136+
genHWIntrinsic_R_RM_I(node, ins, static_cast<int8_t>(ival));
137+
}
129138
}
130139
else if ((category == HW_Category_SIMDScalar) && HWIntrinsicInfo::CopiesUpperBits(intrinsicId))
131140
{

0 commit comments

Comments
 (0)