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

25 lines
517 B
Plaintext
Raw Normal View History

2019-05-21 16:38:05 +00:00
{
let x := calldataload(1)
let a := add(x, 10)
2019-05-27 22:14:01 +00:00
let b := add(x, 42)
mstore(a, 7)
2019-05-21 16:38:05 +00:00
// does not invalidate the first store, because the
2019-05-27 22:14:01 +00:00
// difference is larger than 32, even if the absolute
2019-05-21 16:38:05 +00:00
// values are unknown
2019-05-27 22:14:01 +00:00
mstore(b, 8)
sstore(mload(a), mload(b))
2019-05-21 16:38:05 +00:00
}
// ----
// step: loadResolver
//
2019-05-21 16:38:05 +00:00
// {
// let x := calldataload(1)
// let a := add(x, 10)
2019-05-27 22:14:01 +00:00
// let b := add(x, 42)
2019-05-21 16:38:05 +00:00
// let _4 := 7
2019-05-27 22:14:01 +00:00
// mstore(a, _4)
2019-05-21 16:38:05 +00:00
// let _5 := 8
2019-05-27 22:14:01 +00:00
// mstore(b, _5)
// sstore(_4, _5)
2019-05-21 16:38:05 +00:00
// }