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

21 lines
643 B
Plaintext
Raw Normal View History

{
2020-08-03 20:42:39 +00:00
// This is not fully simplified on purpose because we
// need another split step in between. The full simplification
// is tested in the fullSuite.
let a := and(create2(0, 0, 0x20, 0), 0xffffffffffffffffffffffffffffffffffffffff)
let b := and(0xffffffffffffffffffffffffffffffffffffffff, create2(0, 0, 0x20, 0))
2020-08-03 20:42:39 +00:00
sstore(a, b)
}
// ====
// EVMVersion: >=constantinople
// ----
// step: expressionSimplifier
//
// {
2020-08-03 20:42:39 +00:00
// let _1 := 0xffffffffffffffffffffffffffffffffffffffff
// let _2 := 0
// let _3 := 0x20
// let a := and(create2(_2, _2, _3, _2), _1)
// sstore(a, and(_1, create2(_2, _2, _3, _2)))
// }