mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
yul: Set non movable flag to true in simplification rule for byte of right-shifted expression
This commit is contained in:
committed by
chriseth
parent
08791ab0d4
commit
5100effeec
@@ -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())))
|
||||
// }
|
||||
Reference in New Issue
Block a user