solidity/test/libyul/yulOptimizerTests/loadResolver/merge_mload_with_rewrite.yul
Daniel Kirchner 10618188dd Update tests.
2021-11-09 14:34:05 +01:00

25 lines
454 B
Plaintext

{
let b := mload(2)
if calldataload(1) {
mstore(2, 7)
// Re-writing the old value, should allow to eliminate the load below.
mstore(2, b)
}
sstore(0, mload(2))
}
// ----
// step: loadResolver
//
// {
// {
// let _1 := 2
// let b := mload(_1)
// if calldataload(1)
// {
// mstore(_1, 7)
// mstore(_1, b)
// }
// sstore(0, b)
// }
// }