Skip to content

Commit 6785a96

Browse files
committed
Bug fix.
1 parent 8b008b3 commit 6785a96

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

src/coreclr/jit/hwintrinsic.cpp

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,6 +1772,26 @@ struct HWIntrinsicSignatureReader final
17721772
{
17731773
return JITtype2varType(op4JitType);
17741774
}
1775+
1776+
var_types GetOp1TypeAsPrecise() const
1777+
{
1778+
return JitType2PreciseVarType(op1JitType);
1779+
}
1780+
1781+
var_types GetOp2TypeAsPrecise() const
1782+
{
1783+
return JitType2PreciseVarType(op2JitType);
1784+
}
1785+
1786+
var_types GetOp3TypeAsPrecise() const
1787+
{
1788+
return JitType2PreciseVarType(op3JitType);
1789+
}
1790+
1791+
var_types GetOp4TypeAsPrecise() const
1792+
{
1793+
return JitType2PreciseVarType(op4JitType);
1794+
}
17751795
};
17761796

17771797
//------------------------------------------------------------------------
@@ -1985,8 +2005,6 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic,
19852005
}
19862006
}
19872007

1988-
// LAST: in the middle of changes here
1989-
19902008
simdBaseType = getBaseTypeFromArgIfNeeded(intrinsic, sig, simdBaseType);
19912009
unsigned simdSize = 0;
19922010

@@ -2353,7 +2371,7 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic,
23532371
{
23542372
// TODO-XArch-Cleanup: currently we use the simdBaseJitType to bring the type of the second argument
23552373
// to the code generator. May encode the overload info in other way.
2356-
retNode->AsHWIntrinsic()->SetSimdBaseType(sigReader.GetOp2Type());
2374+
retNode->AsHWIntrinsic()->SetSimdBaseType(sigReader.GetOp2TypeAsPrecise());
23572375
}
23582376
#elif defined(TARGET_ARM64)
23592377
switch (intrinsic)
@@ -2362,7 +2380,7 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic,
23622380
case NI_Crc32_ComputeCrc32C:
23632381
case NI_Crc32_Arm64_ComputeCrc32:
23642382
case NI_Crc32_Arm64_ComputeCrc32C:
2365-
retNode->AsHWIntrinsic()->SetSimdBaseType(sigReader.GetOp2Type());
2383+
retNode->AsHWIntrinsic()->SetSimdBaseType(sigReader.GetOp2TypeAsPrecise());
23662384
break;
23672385

23682386
case NI_AdvSimd_AddWideningUpper:

0 commit comments

Comments
 (0)