diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp index db5b6a6c97006..fab5ed80d9fd8 100644 --- a/src/coreclr/jit/assertionprop.cpp +++ b/src/coreclr/jit/assertionprop.cpp @@ -4356,8 +4356,7 @@ GenTree* Compiler::optAssertionPropLocal_RelOp(ASSERT_VALARG_TP assertions, GenT foldResult = !foldResult; } - op2->AsIntCon()->gtIconVal = foldResult; - op2->gtType = TYP_INT; + op2->BashToConst((ssize_t)foldResult, TYP_INT); return optAssertionProp_Update(op2, tree, stmt); }