Skip to content

Commit 1061818

Browse files
committed
Update tests.
1 parent f2d9a80 commit 1061818

File tree

159 files changed

+893
-638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+893
-638
lines changed
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
{
2-
let _1 := mload(0)
3-
let f_a := mload(1)
4-
let f_r
52
{
6-
f_a := mload(f_a)
7-
f_r := add(f_a, calldatasize())
3+
let _1 := mload(0)
4+
let f_a := mload(1)
5+
let f_r
6+
{
7+
f_a := mload(f_a)
8+
f_r := add(f_a, calldatasize())
9+
}
10+
let z := mload(2)
811
}
9-
let z := mload(2)
1012
}
1113
// ----
1214
// step: blockFlattener
1315
//
1416
// {
15-
// let _1 := mload(0)
16-
// let f_a := mload(1)
17-
// let f_r
18-
// f_a := mload(f_a)
19-
// f_r := add(f_a, calldatasize())
20-
// let z := mload(2)
17+
// {
18+
// let _1 := mload(0)
19+
// let f_a := mload(1)
20+
// let f_r
21+
// f_a := mload(f_a)
22+
// f_r := add(f_a, calldatasize())
23+
// let z := mload(2)
24+
// }
2125
// }
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
2-
for { let a := 1 } iszero(eq(a, 10)) { a := add(a, 1) } {
3-
a := add(a, 1)
2+
{
3+
for { let a := 1 } iszero(eq(a, 10)) { a := add(a, 1) } {
4+
a := add(a, 1)
5+
}
46
}
57
}
68
// ----
79
// step: blockFlattener
810
//
911
// {
10-
// for { let a := 1 } iszero(eq(a, 10)) { a := add(a, 1) }
11-
// { a := add(a, 1) }
12+
// {
13+
// for { let a := 1 } iszero(eq(a, 10)) { a := add(a, 1) }
14+
// { a := add(a, 1) }
15+
// }
1216
// }
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
{
2-
if add(mload(7), sload(mload(3)))
32
{
4-
let y := add(mload(3), 3)
5-
{
6-
y := add(y, 7)
7-
}
3+
if add(mload(7), sload(mload(3)))
4+
{
5+
let y := add(mload(3), 3)
6+
{
7+
y := add(y, 7)
8+
}
9+
}
10+
let t := add(3, 9)
811
}
9-
let t := add(3, 9)
1012
}
1113
// ----
1214
// step: blockFlattener
1315
//
1416
// {
15-
// if add(mload(7), sload(mload(3)))
1617
// {
17-
// let y := add(mload(3), 3)
18-
// y := add(y, 7)
18+
// if add(mload(7), sload(mload(3)))
19+
// {
20+
// let y := add(mload(3), 3)
21+
// y := add(y, 7)
22+
// }
23+
// let t := add(3, 9)
1924
// }
20-
// let t := add(3, 9)
2125
// }
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
{
2-
let a := 3
3-
let b := 4
42
{
5-
a := add(b, 3)
6-
let c := 5
3+
let a := 3
4+
let b := 4
75
{
8-
b := add(b, 4)
6+
a := add(b, 3)
7+
let c := 5
98
{
10-
c := add(a, 5)
11-
}
12-
b := add(a, b)
9+
b := add(b, 4)
10+
{
11+
c := add(a, 5)
12+
}
13+
b := add(a, b)
14+
}
15+
a := add(a, c)
1316
}
14-
a := add(a, c)
1517
}
1618
}
1719
// ----
1820
// step: blockFlattener
1921
//
2022
// {
21-
// let a := 3
22-
// let b := 4
23-
// a := add(b, 3)
24-
// let c := 5
25-
// b := add(b, 4)
26-
// c := add(a, 5)
27-
// b := add(a, b)
28-
// a := add(a, c)
23+
// {
24+
// let a := 3
25+
// let b := 4
26+
// a := add(b, 3)
27+
// let c := 5
28+
// b := add(b, 4)
29+
// c := add(a, 5)
30+
// b := add(a, b)
31+
// a := add(a, c)
32+
// }
2933
// }
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
{
2+
{
23
let a := 1
34
switch calldataload(0)
45
case 0 { { { mstore(0, 1) } } a := 8 }
56
default { a := 3 { a := 4 } }
67
a := 5
8+
}
79
}
810
// ----
911
// step: blockFlattener
1012
//
1113
// {
12-
// let a := 1
13-
// switch calldataload(0)
14-
// case 0 {
15-
// mstore(0, 1)
16-
// a := 8
14+
// {
15+
// let a := 1
16+
// switch calldataload(0)
17+
// case 0 {
18+
// mstore(0, 1)
19+
// a := 8
20+
// }
21+
// default {
22+
// a := 3
23+
// a := 4
24+
// }
25+
// a := 5
1726
// }
18-
// default {
19-
// a := 3
20-
// a := 4
21-
// }
22-
// a := 5
2327
// }

test/libyul/yulOptimizerTests/circularReferencesPruner/called_from_non_function.yul

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
// step: circularReferencesPruner
1010
//
1111
// {
12-
// let a
13-
// a := h()
12+
// {
13+
// let a
14+
// a := h()
15+
// }
1416
// function f() -> x
1517
// { x := g() }
1618
// function g() -> y

test/libyul/yulOptimizerTests/circularReferencesPruner/nested_different_names.yul

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
// ----
1212
// step: circularReferencesPruner
1313
//
14-
// { }
14+
// { { } }

test/libyul/yulOptimizerTests/circularReferencesPruner/nested_same_name.yul

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
// ----
1212
// step: circularReferencesPruner
1313
//
14-
// { }
14+
// { { } }

test/libyul/yulOptimizerTests/circularReferencesPruner/trivial.yul

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
// ----
66
// step: circularReferencesPruner
77
//
8-
// { }
8+
// { { } }

test/libyul/yulOptimizerTests/expressionJoiner/if_condition.yul

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// step: expressionJoiner
1515
//
1616
// {
17-
// if add(mload(7), sload(mload(3))) { let y := add(mload(3), 3) }
18-
// let t := add(3, 9)
17+
// {
18+
// if add(mload(7), sload(mload(3))) { let y := add(mload(3), 3) }
19+
// let t := add(3, 9)
20+
// }
1921
// }

0 commit comments

Comments
 (0)