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

27 lines
508 B
Plaintext
Raw Normal View History

2019-08-28 15:34:31 +00:00
{
let a := calldataload(0)
let b := byte(33, a)
let c := byte(20, a)
// create cannot be removed.
let d := byte(33, create(0, 0, 0x20))
2020-08-03 20:42:39 +00:00
sstore(7, a)
sstore(8, b)
sstore(9, c)
sstore(10, d)
2019-08-28 15:34:31 +00:00
}
// ----
// step: expressionSimplifier
//
2019-08-28 15:34:31 +00:00
// {
2020-08-03 20:42:39 +00:00
// let _1 := 0
// let a := calldataload(_1)
2019-08-28 15:34:31 +00:00
// let b := 0
// let c := byte(20, a)
2020-08-03 20:42:39 +00:00
// pop(create(_1, _1, 0x20))
// let d := 0
// sstore(7, a)
// sstore(8, b)
// sstore(9, c)
// sstore(10, d)
2019-08-28 15:34:31 +00:00
// }