diff options
author | Mathias Baumann <marenz@supradigital.org> | 2018-12-05 19:16:06 +0800 |
---|---|---|
committer | Mathias Baumann <marenz@supradigital.org> | 2018-12-06 01:01:41 +0800 |
commit | f4e9c70ecc7d4a8c354085b75fea720ab1ebe3a7 (patch) | |
tree | 7497dc627ff19ec94236d29a87aba5a8433e29f2 | |
parent | 32c9da9419499bf839f239ef3e1a8df627218ade (diff) | |
download | dexon-solidity-f4e9c70ecc7d4a8c354085b75fea720ab1ebe3a7.tar.gz dexon-solidity-f4e9c70ecc7d4a8c354085b75fea720ab1ebe3a7.tar.zst dexon-solidity-f4e9c70ecc7d4a8c354085b75fea720ab1ebe3a7.zip |
Tests for SSAValueTracker ignoring function call on rhs
-rw-r--r-- | test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul | 14 | ||||
-rw-r--r-- | test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul | 12 |
2 files changed, 26 insertions, 0 deletions
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) +// } |