Merge pull request #6129 from ethereum/expressionSimplifierToUseDataFlowAnalyzer

Fix expression simplifying by moving from SSAValueTracker to DataFlowAnalyzer as a base.
This commit is contained in:
chriseth
2019-02-28 12:21:41 +01:00
committed by GitHub
5 changed files with 37 additions and 12 deletions
@@ -0,0 +1,12 @@
{
let x := mload(0)
x := 0
mstore(0, add(7, x))
}
// ----
// expressionSimplifier
// {
// let x := mload(0)
// x := 0
// mstore(0, 7)
// }
@@ -0,0 +1,16 @@
{
// This tests that a bug is fixed that was related to just taking
// values of SSA variables in account and not clearing them when
// a dependency was reassigned.
pop(foo())
function foo() -> x_9
{
x_9 := sub(1,sub(x_9,1))
mstore(sub(1,div(sub(x_9,1),sub(1,sub(x_9,1)))), 1)
}
}
// ----
// fullSuite
// {
// mstore(1, 1)
// }