mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
OSRA: improve handling of equality comparisons
Equality comparisons used to be ignored more often than required due to the fact that they give no hint on the signedness of the tracked value. This commits removes some assertions and improves the handling of OSRs without a known signedness. In particular, now, inequalities can be solved even in absence of signedness information, as long as the result that you would get with a signed OSR and an unsigned OSR matches (i.e., the signedness doesn't matter).
This commit is contained in:
@@ -545,7 +545,7 @@ bool SET::handleInstructionWithOSRA(Instruction *Target, Value *V) {
|
||||
OS.explore(CI::get(Int64, O->constant()));
|
||||
} else {
|
||||
// Hard limit
|
||||
if (O->size() >= 10000)
|
||||
if (not O->boundedValue()->hasSignedness() or O->size() >= 10000)
|
||||
return false;
|
||||
|
||||
// We have a limited range, let's use it all
|
||||
|
||||
Reference in New Issue
Block a user