accidentally forgot about improvements if there were multiplie candidates

This commit is contained in:
Oliver Schneider 2016-03-29 16:27:06 +02:00
parent be7288303a
commit 216edbae59
3 changed files with 6 additions and 3 deletions

View file

@ -275,7 +275,7 @@ impl<'a, 'tcx> NonminimalBoolVisitor<'a, 'tcx> {
return;
}
// if the number of occurrences of a terminal decreases or any of the stats decreases while none increases
improvement = (stats.terminals[i] > simplified_stats.terminals[i]) ||
improvement |= (stats.terminals[i] > simplified_stats.terminals[i]) ||
(stats.negations > simplified_stats.negations && stats.ops == simplified_stats.ops) ||
(stats.ops > simplified_stats.ops && stats.negations == simplified_stats.negations);
}