solidity/test/libyul/yulOptimizerTests/memoryStoreRemover/simple4.yul
2021-04-26 09:33:18 +02:00

20 lines
349 B
Plaintext

{
let x := 10
let y := 10
// should not be removed because of the if statement
mstore(x, y)
if calldataload(0) {
// reads inside control flow
pop(mload(x))
}
}
// ----
// step: memoryStoreRemover
//
// {
// let x := 10
// let y := 10
// mstore(x, y)
// if calldataload(0) { pop(mload(x)) }
// }