yul: Set non movable flag to true in simplification rule for byte of right-shifted expression

This commit is contained in:
Bhargava Shastry
2020-08-03 17:30:52 +02:00
committed by chriseth
parent 08791ab0d4
commit 5100effeec
7 changed files with 74 additions and 2 deletions
@@ -0,0 +1,10 @@
{
pop(byte(0, shr(0x8, call(0, 0, 0, 0, 0, 0, 0))))
}
// ====
// EVMVersion: >=constantinople
// ----
// Trace:
// CALL(0, 0, 0, 0, 0, 0, 0)
// Memory dump:
// Storage dump:
@@ -0,0 +1,11 @@
{
function f() -> x { mstore(0, 0x1337) }
pop(byte(0, shr(0x8, f())))
}
// ====
// EVMVersion: >=constantinople
// ----
// Trace:
// Memory dump:
// 0: 0000000000000000000000000000000000000000000000000000000000001337
// Storage dump:
@@ -0,0 +1,11 @@
{
pop(byte(0, shr(0x8, call(0, 0, 0, 0, 0, 0, 0))))
}
// ====
// EVMVersion: >=constantinople
// ----
// step: expressionSimplifier
//
// {
// pop(byte(0, shr(0x8, call(0, 0, 0, 0, 0, 0, 0))))
// }
@@ -0,0 +1,14 @@
{
function f() -> x { mstore(0, 1337) }
pop(byte(0, shr(0x8, f())))
}
// ====
// EVMVersion: >=constantinople
// ----
// step: expressionSimplifier
//
// {
// function f() -> x
// { mstore(0, 1337) }
// pop(byte(0, shr(0x8, f())))
// }
@@ -0,0 +1,14 @@
{
function f() -> x {}
pop(byte(0, shr(0x8, f())))
}
// ====
// EVMVersion: >=constantinople
// ----
// step: expressionSimplifier
//
// {
// function f() -> x
// { }
// pop(byte(0, shr(0x8, f())))
// }