Fix another bug in DFG simplifier. Fix long subtraction bug

This commit is contained in:
Alexey Andreev 2015-03-13 14:26:36 +04:00
parent 0572123c0e
commit 31f6439652
2 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ public class DataFlowGraphBuilder implements InstructionReader {
startNodes.add(i);
}
for (int pred : graph.incomingEdges(i)) {
if (importantNodes.contains(pred) && importantNodes.contains(i)) {
if (importantNodes.contains(classes.find(pred)) && importantNodes.contains(classes.find(i))) {
continue;
}
int newCls = classes.union(pred, i);
@ -80,7 +80,7 @@ public class DataFlowGraphBuilder implements InstructionReader {
for (int[] scc : sccs) {
int last = -1;
for (int node : scc) {
if (!importantNodes.contains(node)) {
if (!importantNodes.contains(classes.find(node))) {
continue;
}
last = last < 0 ? node : classes.union(node, last);

View File

@ -605,7 +605,7 @@ function Long_toNumber(val) {
return 0x100000000 * hi + lo;
}
function Long_add(a, b) {
if (a.hi === a.lo >> 31 && b.hi === b.lo >> 31) {
if (a.hi === (a.lo >> 31) && b.hi === (b.lo >> 31)) {
return Long_fromNumber(a.lo + b.lo);
}
var a_lolo = a.lo & 0xFFFF;
@ -643,7 +643,7 @@ function Long_neg(a) {
return Long_inc(new Long(a.lo ^ 0xFFFFFFFF, a.hi ^ 0xFFFFFFFF));
}
function Long_sub(a, b) {
if (a.hi === 0 && a.lo >> 31 && b.hi === b.lo >> 31) {
if (a.hi === (a.lo >> 31) && b.hi === (b.lo >> 31)) {
return Long_fromNumber(a.lo - b.lo);
}
var a_lolo = a.lo & 0xFFFF;