Add bitshift optimizer tests

This commit is contained in:
Mathias Baumann 2019-03-14 16:30:11 +01:00 committed by chriseth
parent 5b871f61a2
commit d46f29e128
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,16 @@
{
let a := and(0xff, shr(248, calldataload(0)))
let b := and(shr(248, calldataload(0)), 0xff)
let c := and(shr(249, calldataload(0)), 0xfa)
let d := and(shr(247, calldataload(0)), 0xff)
}
// ====
// EVMVersion: >byzantium
// step: expressionSimplifier
// ----
// {
// let a := shr(248, calldataload(0))
// let b := shr(248, calldataload(0))
// let c := and(shr(249, calldataload(0)), 0xfa)
// let d := and(shr(247, calldataload(0)), 0xff)
// }

View File

@ -0,0 +1,16 @@
{
let a := shl(299, calldataload(0))
let b := shr(299, calldataload(1))
let c := shl(255, calldataload(2))
let d := shr(255, calldataload(3))
}
// ====
// EVMVersion: >byzantium
// step: expressionSimplifier
// ----
// {
// let a := 0
// let b := 0
// let c := shl(255, calldataload(2))
// let d := shr(255, calldataload(3))
// }