diff options
Diffstat (limited to 'test/libyul')
3 files changed, 40 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) +// } diff --git a/test/libyul/yulOptimizerTests/expressionSimplifier/unassigned_vars.yul b/test/libyul/yulOptimizerTests/expressionSimplifier/unassigned_vars.yul new file mode 100644 index 00000000..87391b8c --- /dev/null +++ b/test/libyul/yulOptimizerTests/expressionSimplifier/unassigned_vars.yul @@ -0,0 +1,14 @@ +// c & d can't be optimized as expression simplifier doesn't handle default +// values yet +{ + let c + let d + let y := add(d, add(c, 7)) +} +// ---- +// expressionSimplifier +// { +// let c +// let d +// let y := add(add(d, c), 7) +// } |