solidity/test/libyul/objectCompiler/simple_optimizer.yul

23 lines
466 B
Plaintext
Raw Normal View History

2018-12-05 11:02:49 +00:00
{
let x := calldataload(0)
let y := calldataload(0)
let z := sub(y, x)
sstore(add(x, 0), z)
}
// ====
// optimizationPreset: full
2018-12-05 11:02:49 +00:00
// ----
// Assembly:
// /* "source":26:27 */
2018-12-05 11:02:49 +00:00
// 0x00
// /* "source":13:28 */
2021-09-15 15:01:40 +00:00
// dup1
2018-12-05 11:02:49 +00:00
// calldataload
// /* "source":79:99 */
2018-12-05 11:02:49 +00:00
// sstore
2021-09-15 15:01:40 +00:00
// /* "source":0:101 */
// stop
// Bytecode: 600080355500
// Opcodes: PUSH1 0x0 DUP1 CALLDATALOAD SSTORE STOP
// SourceMappings: 26:1:0:-:0;13:15;;79:20;0:101