|
| 1 | +// This is a regression test in context of https://github.com/argotorg/solidity/pull/16499: |
| 2 | +// A BFS deduplication performance bug in `bringUpTargetSlot` where the same offset could be enqueued multiple times |
| 3 | +// before being visited, by marking offsets as seen on enqueue rather than on dequeue. |
| 4 | +{ |
| 5 | + mstore(memoryguard(0x10000), 1) |
| 6 | + sstore(mload(calldataload(0)), 1) |
| 7 | + { |
| 8 | + function foo_n_0(x_4, x_5) |
| 9 | + { |
| 10 | + if x_5 { |
| 11 | + x_4 := 0x2000000000001 |
| 12 | + } |
| 13 | + x_4 := call( |
| 14 | + call( |
| 15 | + blockhash(0x200000000001), |
| 16 | + 0x20000000001, |
| 17 | + 0x2000000001, |
| 18 | + mod("h", 32768), |
| 19 | + mod(0x200000001, 32768), |
| 20 | + mod(0x20000001, 32768), |
| 21 | + mod(0x2000001, 32768) |
| 22 | + ), |
| 23 | + 0x200001, |
| 24 | + 0x20001, |
| 25 | + mod(0x2001, 32768), |
| 26 | + mod(calldatasize(), 32768), |
| 27 | + mod(calldatasize(), 32768), |
| 28 | + mod( |
| 29 | + call( |
| 30 | + call( |
| 31 | + x_4, |
| 32 | + 0x201, |
| 33 | + number(), |
| 34 | + mod(0x21, 32768), |
| 35 | + mod(0x3, 32768), |
| 36 | + mod(0x3f, 32768), |
| 37 | + mod(address(), 32768) |
| 38 | + ), |
| 39 | + 0x3ff, |
| 40 | + 0x3fff, |
| 41 | + mod(0x3ffff, 32768), |
| 42 | + mod(9042383626829830, 32768), |
| 43 | + mod(0x3fffff, 32768), |
| 44 | + mod(0x3ffffff, 32768) |
| 45 | + ), |
| 46 | + 32768 |
| 47 | + ) |
| 48 | + ) |
| 49 | + } |
| 50 | + foo_n_0(0x200000000000000001, 0x20000000000000001) |
| 51 | + foo_n_0(sload(224),calldataload(288)) |
| 52 | + foo_n_0(0x3ffffffffffff, 0x3fffffffffffff) |
| 53 | + foo_n_0(0x3fffffffffffffff, 0x3ffffffffffffffff) |
| 54 | + foo_n_0(0x3ffffffffffffffffff, 0x3fffffffffffffffffff) |
| 55 | + } |
| 56 | +} |
| 57 | +// ==== |
| 58 | +// EVMVersion: >homestead |
| 59 | +// ---- |
| 60 | +// step: fullSuite |
| 61 | +// |
| 62 | +// { |
| 63 | +// { |
| 64 | +// mstore(memoryguard(0x010000), 1) |
| 65 | +// sstore(mload(calldataload(0)), 1) |
| 66 | +// let x := 0x200000000000000001 |
| 67 | +// x := 0x2000000000001 |
| 68 | +// let _1 := and(call(call(x, 0x201, number(), 0x21, 0x3, 0x3f, and(address(), 32767)), 0x3ff, 0x3fff, 32767, 6, 32767, 32767), 32767) |
| 69 | +// pop(call(call(blockhash(0x200000000001), 0x20000000001, 0x2000000001, and("h", 32767), 1, 1, 1), 0x200001, 0x20001, 0x2001, and(calldatasize(), 32767), and(calldatasize(), 32767), _1)) |
| 70 | +// let x_1 := sload(224) |
| 71 | +// if calldataload(288) { x_1 := x } |
| 72 | +// pop(call(call(blockhash(0x200000000001), 0x20000000001, 0x2000000001, and("h", 32767), 1, 1, 1), 0x200001, 0x20001, 0x2001, and(calldatasize(), 32767), and(calldatasize(), 32767), and(call(call(x_1, 0x201, number(), 0x21, 0x3, 0x3f, and(address(), 32767)), 0x3ff, 0x3fff, 32767, 6, 32767, 32767), 32767))) |
| 73 | +// let x_2 := 0x3ffffffffffff |
| 74 | +// x_2 := x |
| 75 | +// pop(call(call(blockhash(0x200000000001), 0x20000000001, 0x2000000001, and("h", 32767), 1, 1, 1), 0x200001, 0x20001, 0x2001, and(calldatasize(), 32767), and(calldatasize(), 32767), and(call(call(x, 0x201, number(), 0x21, 0x3, 0x3f, and(address(), 32767)), 0x3ff, 0x3fff, 32767, 6, 32767, 32767), 32767))) |
| 76 | +// let x_3 := 0x3fffffffffffffff |
| 77 | +// x_3 := x |
| 78 | +// pop(call(call(blockhash(0x200000000001), 0x20000000001, 0x2000000001, and("h", 32767), 1, 1, 1), 0x200001, 0x20001, 0x2001, and(calldatasize(), 32767), and(calldatasize(), 32767), and(call(call(x, 0x201, number(), 0x21, 0x3, 0x3f, and(address(), 32767)), 0x3ff, 0x3fff, 32767, 6, 32767, 32767), 32767))) |
| 79 | +// let x_4 := 0x3ffffffffffffffffff |
| 80 | +// x_4 := x |
| 81 | +// pop(call(call(blockhash(0x200000000001), 0x20000000001, 0x2000000001, and("h", 32767), 1, 1, 1), 0x200001, 0x20001, 0x2001, and(calldatasize(), 32767), and(calldatasize(), 32767), and(call(call(x, 0x201, number(), 0x21, 0x3, 0x3f, and(address(), 32767)), 0x3ff, 0x3fff, 32767, 6, 32767, 32767), 32767))) |
| 82 | +// } |
| 83 | +// } |
0 commit comments