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

26 lines
470 B
Plaintext
Raw Normal View History

{
mstore(2, 3)
if calldataload(1) {
mstore(2, 7)
// Re-writing the old value, should allow to eliminate the load below.
mstore(2, 3)
}
sstore(0, mload(2))
}
// ----
// step: loadResolver
//
// {
// {
2021-11-09 12:25:25 +00:00
// let _1 := 3
// let _2 := 2
// mstore(_2, _1)
2021-11-09 12:25:25 +00:00
// if calldataload(1)
// {
// mstore(_2, 7)
// mstore(_2, _1)
// }
// sstore(0, _1)
// }
// }