From f4e9c70ecc7d4a8c354085b75fea720ab1ebe3a7 Mon Sep 17 00:00:00 2001 From: Mathias Baumann Date: Wed, 5 Dec 2018 12:16:06 +0100 Subject: Tests for SSAValueTracker ignoring function call on rhs --- .../expressionSimplifier/assigned_vars_multi.yul | 14 ++++++++++++++ .../expressionSimplifier/unassigend_vars_multi.yul | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul create mode 100644 test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul (limited to 'test/libyul') diff --git a/test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul b/test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul new file mode 100644 index 00000000..51f5df40 --- /dev/null +++ b/test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul @@ -0,0 +1,14 @@ +{ + function f() -> x, z {} + let c, d := f() + let y := add(d, add(c, 7)) +} +// ---- +// expressionSimplifier +// { +// function f() -> x, z +// { +// } +// let c, d := f() +// let y := add(add(d, c), 7) +// } diff --git a/test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul b/test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul new file mode 100644 index 00000000..8c1ad789 --- /dev/null +++ b/test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul @@ -0,0 +1,12 @@ +// c & d can't be optimized as expression simplifier doesn't handle default +// values yet +{ + let c, d + let y := add(d, add(c, 7)) +} +// ---- +// expressionSimplifier +// { +// let c, d +// let y := add(add(d, c), 7) +// } -- cgit