aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/objectCompiler
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-06 06:42:55 +0800
committerchriseth <chris@ethereum.org>2019-01-07 21:03:32 +0800
commit2e9c70add0490a5157f393c78e29bb86f67111d7 (patch)
treeaa182a37aa5cc21be1144041ad3d6df803e9c255 /test/libyul/objectCompiler
parentaca9e581454585fab494a87febb7da3278e3aa7b (diff)
downloaddexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.tar
dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.tar.gz
dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.tar.bz2
dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.tar.lz
dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.tar.xz
dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.tar.zst
dexon-solidity-2e9c70add0490a5157f393c78e29bb86f67111d7.zip
Use rematerializer if variable is unreferenced or value is "cheap".
Diffstat (limited to 'test/libyul/objectCompiler')
-rw-r--r--test/libyul/objectCompiler/nested_optimizer.yul18
-rw-r--r--test/libyul/objectCompiler/simple_optimizer.yul11
2 files changed, 7 insertions, 22 deletions
diff --git a/test/libyul/objectCompiler/nested_optimizer.yul b/test/libyul/objectCompiler/nested_optimizer.yul
index 7739ce61..2775c346 100644
--- a/test/libyul/objectCompiler/nested_optimizer.yul
+++ b/test/libyul/objectCompiler/nested_optimizer.yul
@@ -19,31 +19,21 @@ object "a" {
// Assembly:
// /* "source":60:61 */
// 0x00
-// /* "source":137:138 */
-// dup1
-// /* "source":60:61 */
-// dup2
+// 0x00
// /* "source":47:62 */
// calldataload
// /* "source":119:139 */
// sstore
-// /* "source":32:143 */
-// pop
// stop
//
// sub_0: assembly {
// /* "source":200:201 */
// 0x00
-// /* "source":283:284 */
-// dup1
-// /* "source":200:201 */
-// dup2
+// 0x00
// /* "source":187:202 */
// calldataload
// /* "source":265:285 */
// sstore
-// /* "source":170:291 */
-// pop
// }
-// Bytecode: 60008081355550fe
-// Opcodes: PUSH1 0x0 DUP1 DUP2 CALLDATALOAD SSTORE POP INVALID
+// Bytecode: 600060003555fe
+// Opcodes: PUSH1 0x0 PUSH1 0x0 CALLDATALOAD SSTORE INVALID
diff --git a/test/libyul/objectCompiler/simple_optimizer.yul b/test/libyul/objectCompiler/simple_optimizer.yul
index 43b33553..c757dee7 100644
--- a/test/libyul/objectCompiler/simple_optimizer.yul
+++ b/test/libyul/objectCompiler/simple_optimizer.yul
@@ -9,15 +9,10 @@
// Assembly:
// /* "source":38:39 */
// 0x00
-// /* "source":109:110 */
-// dup1
-// /* "source":38:39 */
-// dup2
+// 0x00
// /* "source":25:40 */
// calldataload
// /* "source":91:111 */
// sstore
-// /* "source":12:113 */
-// pop
-// Bytecode: 60008081355550
-// Opcodes: PUSH1 0x0 DUP1 DUP2 CALLDATALOAD SSTORE POP
+// Bytecode: 600060003555
+// Opcodes: PUSH1 0x0 PUSH1 0x0 CALLDATALOAD SSTORE