mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace exp by shl.
This commit is contained in:
committed by
Harikrishnan Mulackal
parent
ccc6106c7c
commit
684fff34a9
@@ -0,0 +1,22 @@
|
||||
{
|
||||
let t := calldataload(0)
|
||||
sstore(0, exp(0, t))
|
||||
sstore(1, exp(1, t))
|
||||
sstore(2, exp(2, t))
|
||||
// The following should not be simplified
|
||||
sstore(3, exp(8, t))
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: >=constantinople
|
||||
// ----
|
||||
// step: expressionSimplifier
|
||||
//
|
||||
// {
|
||||
// let _1 := 0
|
||||
// let t := calldataload(_1)
|
||||
// sstore(_1, iszero(t))
|
||||
// sstore(1, 1)
|
||||
// let _8 := 2
|
||||
// sstore(_8, shl(t, 1))
|
||||
// sstore(3, exp(8, t))
|
||||
// }
|
||||
Reference in New Issue
Block a user