File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2182,7 +2182,7 @@ simplify_exprt::simplify_overflow_binary(const binary_overflow_exprt &expr)
2182
2182
// zero.
2183
2183
if (
2184
2184
expr.op1 ().is_zero () ||
2185
- (expr.op0 ().is_zero () && expr. id () != ID_overflow_minus ))
2185
+ (expr.op0 ().is_zero () && !can_cast_expr<minus_overflow_exprt>(expr) ))
2186
2186
{
2187
2187
return false_exprt{};
2188
2188
}
@@ -2208,7 +2208,7 @@ simplify_exprt::simplify_overflow_binary(const binary_overflow_exprt &expr)
2208
2208
return false_exprt{};
2209
2209
}
2210
2210
2211
- if (op_type_id == ID_natural && expr. id () != ID_overflow_minus )
2211
+ if (op_type_id == ID_natural && !can_cast_expr<minus_overflow_exprt>(expr) )
2212
2212
return false_exprt{};
2213
2213
2214
2214
// we only handle constants over signedbv/unsignedbv for the remaining cases
@@ -2226,7 +2226,7 @@ simplify_exprt::simplify_overflow_binary(const binary_overflow_exprt &expr)
2226
2226
mp_integer no_overflow_result;
2227
2227
if (expr.id () == ID_overflow_plus)
2228
2228
no_overflow_result = *op0_value + *op1_value;
2229
- else if (expr. id () == ID_overflow_minus )
2229
+ else if (can_cast_expr<minus_overflow_exprt>(expr) )
2230
2230
no_overflow_result = *op0_value - *op1_value;
2231
2231
else if (expr.id () == ID_overflow_mult)
2232
2232
no_overflow_result = *op0_value * *op1_value;
You can’t perform that action at this time.
0 commit comments