From e8a2d570756a5d2ae379babbc4f9be067531acdf Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 18 Oct 2018 00:58:15 +0200 Subject: Flatten more. --- .../blockFlattener/switch_stmt.yul | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/libyul/yulOptimizerTests/blockFlattener/switch_stmt.yul (limited to 'test') diff --git a/test/libyul/yulOptimizerTests/blockFlattener/switch_stmt.yul b/test/libyul/yulOptimizerTests/blockFlattener/switch_stmt.yul new file mode 100644 index 00000000..2df4f9d0 --- /dev/null +++ b/test/libyul/yulOptimizerTests/blockFlattener/switch_stmt.yul @@ -0,0 +1,22 @@ +{ + let a := 1 + switch calldataload(0) + case 0 { { { mstore(0, 1) } } a := 8 } + default { a := 3 { a := 4 } } + a := 5 +} +// ---- +// blockFlattener +// { +// let a := 1 +// switch calldataload(0) +// case 0 { +// mstore(0, 1) +// a := 8 +// } +// default { +// a := 3 +// a := 4 +// } +// a := 5 +// } -- cgit