Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/coreclr/jit/assertionprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,35 @@ bool IntegralRange::Contains(int64_t value) const
case GT_CAST:
return ForCastOutput(node->AsCast());

#if defined(FEATURE_HW_INTRINSICS)
case GT_HWINTRINSIC:
switch (node->AsHWIntrinsic()->GetHWIntrinsicId())
{
#if defined(TARGET_XARCH)
case NI_BMI1_TrailingZeroCount:
case NI_BMI1_X64_TrailingZeroCount:
case NI_LZCNT_LeadingZeroCount:
case NI_LZCNT_X64_LeadingZeroCount:
case NI_POPCNT_PopCount:
case NI_POPCNT_X64_PopCount:
#elif defined(TARGET_ARM64)
case NI_AdvSimd_PopCount:
case NI_AdvSimd_LeadingZeroCount:
case NI_AdvSimd_LeadingSignCount:
case NI_ArmBase_LeadingZeroCount:
case NI_ArmBase_Arm64_LeadingZeroCount:
case NI_ArmBase_Arm64_LeadingSignCount:
#else
#error Unsupported platform
#endif
// TODO-Casts: specify more precise ranges once "IntegralRange" supports them.
return {SymbolicIntegerValue::Zero, SymbolicIntegerValue::ByteMax};
default:
break;
}
break;
#endif // defined(FEATURE_HW_INTRINSICS)

default:
break;
}
Expand Down