mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix calculating comparison in constant propagation
This commit is contained in:
parent
6695103f49
commit
1c292f3fbe
|
@ -465,7 +465,7 @@ public class GlobalValueNumbering implements MethodOptimization {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COMPARE:
|
case COMPARE:
|
||||||
evaluatedConstant = Float.compare(p, q);
|
evaluatedConstant = p > q ? 1 : p < q ? -1 : p == q ? 0 : 1;
|
||||||
break;
|
break;
|
||||||
case AND:
|
case AND:
|
||||||
case OR:
|
case OR:
|
||||||
|
@ -501,7 +501,7 @@ public class GlobalValueNumbering implements MethodOptimization {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COMPARE:
|
case COMPARE:
|
||||||
evaluatedConstant = Double.compare(p, q);
|
evaluatedConstant = p > q ? 1 : p < q ? -1 : p == q ? 0 : 1;
|
||||||
break;
|
break;
|
||||||
case AND:
|
case AND:
|
||||||
case OR:
|
case OR:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user