Skip to content

Implement Vector.Ceiling / Vector.Floor #31993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 16, 2020
Prev Previous commit
Next Next commit
Do not attempt to treat Ceil/Floor if SSE4.1 isn't available
  • Loading branch information
Gnbrkm41 committed Mar 16, 2020
commit e6c59dcdfa2e9998b9150e2312b9fc12b53b342b
7 changes: 7 additions & 0 deletions src/coreclr/src/jit/simd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3125,6 +3125,13 @@ GenTree* Compiler::impSIMDIntrinsic(OPCODE opcode,

case SIMDIntrinsicCeil:
case SIMDIntrinsicFloor:
#if defined(TARGET_XARCH)
// Rounding instructions are only available from SSE4.1.
if (getSIMDSupportLevel() < SIMD_SSE4_Supported)
{
return nullptr;
}
#endif // defined(TARGET_XARCH)
op1 = impSIMDPopStack(simdType);
retVal = gtNewSIMDNode(genActualType(callType), op1, simdIntrinsicID, baseType, size);
break;
Expand Down