Skip to content

Commit 6a8c32c

Browse files
committed
Fix the assert
1 parent b857e7a commit 6a8c32c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/coreclr/jit/assertionprop.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -4161,10 +4161,9 @@ GenTree* Compiler::optAssertionProp_ModDiv(ASSERT_VALARG_TP assertions, GenTreeO
41614161
}
41624162

41634163
if (((tree->gtFlags & GTF_UMOD_UINT16_OPERANDS) == 0) && tree->OperIs(GT_UMOD) && op2->IsCnsIntOrI() &&
4164-
FitsIn<uint16_t>(op2->AsIntCon()->IconValue()) &&
4164+
FitsIn<uint16_t>(op2->AsIntCon()->IconValue()) && op1IsNotNegative &&
41654165
IntegralRange::ForNode(op1, this).GetUpperBound() <= SymbolicIntegerValue::UShortMax)
41664166
{
4167-
assert(IntegralRange::ForNode(op1, this).GetLowerBound() >= SymbolicIntegerValue::Zero);
41684167
JITDUMP("Both operands for UMOD are in uint16 range...\n")
41694168
tree->gtFlags |= GTF_UMOD_UINT16_OPERANDS;
41704169
changed = true;

0 commit comments

Comments
 (0)