Replace byte(A, X) by zero if A >= 32

This commit is contained in:
chriseth
2019-08-29 15:35:34 +02:00
parent e74b63b6de
commit e86b5cf14e
3 changed files with 25 additions and 0 deletions
@@ -0,0 +1,16 @@
{
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))
}
// ====
// step: expressionSimplifier
// ----
// {
// let a := calldataload(0)
// let b := 0
// let c := byte(20, a)
// let d := byte(33, create(0, 0, 0x20))
// }