JS: fix bug in foldedComparisonEdge

This commit is contained in:
Asger F
2018-11-28 10:21:43 +00:00
parent 8fd3a417c2
commit d69e584cc2
4 changed files with 12 additions and 3 deletions

View File

@@ -464,8 +464,8 @@ module RangeAnalysis {
exists (DataFlow::Node k, int ksign, Bias bias, int avalue, int kvalue |
comparisonEdge(cfg, a, asign, k, ksign, bias, sharp) and
avalue = a.asExpr().getIntValue() * asign and
kvalue = b.asExpr().getIntValue() * bsign and
(avalue < kvalue + bias or sharp = true and avalue = kvalue + bias) and
kvalue = k.asExpr().getIntValue() * ksign and
(avalue > kvalue + bias or sharp = true and avalue = kvalue + bias) and
a = b and
asign = bsign and
c = -1)