solidity/test/libyul/yulOptimizerTests/loadResolver/second_store_same_value.yul

20 lines
381 B
Plaintext
Raw Normal View History

2019-05-21 13:52:15 +00:00
{
let x := calldataload(1)
sstore(x, 7)
sstore(calldataload(0), 7)
// We can replace this because both values that were
// written are 7.
mstore(0, sload(x))
}
// ====
2019-05-27 22:14:01 +00:00
// step: loadResolver
2019-05-21 13:52:15 +00:00
// ----
// {
// let x := calldataload(1)
// let _2 := 7
// sstore(x, _2)
// let _4 := 0
// sstore(calldataload(_4), _2)
// mstore(_4, _2)
// }