solidity/test/libyul/yulOptimizerTests/fullSuite/create2_and_mask.yul

21 lines
635 B
Plaintext
Raw Normal View History

2020-08-03 20:42:39 +00:00
{
// This does not optimize the masks away. Due to the way the expression simplifier
// is built, it would have to create another `create2` opcode for the simplification
// which would be fatal.
let a := and(create2(0, 0, 0x20, 0), 0xffffffffffffffffffffffffffffffffffffffff)
let b := and(0xffffffffffffffffffffffffffffffffffffffff, create2(0, 0, 0x20, 0))
sstore(a, b)
}
// ====
2023-08-04 10:27:18 +00:00
// EVMVersion: >=shanghai
2020-08-03 20:42:39 +00:00
// ----
// step: fullSuite
//
// {
// {
// let _1 := sub(shl(160, 1), 1)
2023-08-04 10:27:18 +00:00
// let a := and(create2(0, 0, 0x20, 0), _1)
// sstore(a, and(_1, create2(0, 0, 0x20, 0)))
2020-08-03 20:42:39 +00:00
// }
// }