diff options
Diffstat (limited to 'test/libyul')
-rw-r--r-- | test/libyul/yulOptimizerTests/forLoopInitRewriter/nested.yul | 48 | ||||
-rw-r--r-- | test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul | 10 |
2 files changed, 53 insertions, 5 deletions
diff --git a/test/libyul/yulOptimizerTests/forLoopInitRewriter/nested.yul b/test/libyul/yulOptimizerTests/forLoopInitRewriter/nested.yul new file mode 100644 index 00000000..3f7aa089 --- /dev/null +++ b/test/libyul/yulOptimizerTests/forLoopInitRewriter/nested.yul @@ -0,0 +1,48 @@ +{ + let random := 42 + for { + for { let a := 1} iszero(eq(a,10)) {} { + a := add(a, 1) + } + let b := 1 + } iszero(eq(b, 10)) { + for { let c := 1 } iszero(eq(c,2)) { c := add(c, 1) } { + b := add(b, 1) + } + } { + mstore(b,b) + } +} +// ---- +// forLoopInitRewriter +// { +// let random := 42 +// let a := 1 +// for { +// } +// iszero(eq(a, 10)) +// { +// } +// { +// a := add(a, 1) +// } +// let b := 1 +// for { +// } +// iszero(eq(b, 10)) +// { +// let c := 1 +// for { +// } +// iszero(eq(c, 2)) +// { +// c := add(c, 1) +// } +// { +// b := add(b, 1) +// } +// } +// { +// mstore(b, b) +// } +// } diff --git a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul index a34da198..573e7868 100644 --- a/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul +++ b/test/libyul/yulOptimizerTests/fullSuite/abi_example1.yul @@ -468,8 +468,8 @@ // let abi_encode_pos_590 := 64 // abi_encode_pos := abi_encode_pos_590 // let abi_encode_srcPtr := add(_485, _1) +// let abi_encode_i_69 := _2 // for { -// let abi_encode_i_69 := _2 // } // lt(abi_encode_i_69, abi_encode_length_68) // { @@ -480,8 +480,8 @@ // let abi_encode_pos_71_1037 := abi_encode_pos // let abi_encode_length_72_1038 := 0x3 // let abi_encode_srcPtr_73_1039 := _931 +// let abi_encode_i_74_1040 := _2 // for { -// let abi_encode_i_74_1040 := _2 // } // lt(abi_encode_i_74_1040, abi_encode_length_72_1038) // { @@ -544,8 +544,8 @@ // { // revert(_2, _2) // } +// let abi_decode_i_33_1052 := _2 // for { -// let abi_decode_i_33_1052 := _2 // } // lt(abi_decode_i_33_1052, abi_decode_length_30_1046) // { @@ -586,8 +586,8 @@ // { // revert(_2, _2) // } +// let abi_decode_i_9_1068 := _2 // for { -// let abi_decode_i_9_1068 := _2 // } // lt(abi_decode_i_9_1068, abi_decode_length_6_1058) // { @@ -616,8 +616,8 @@ // { // revert(_2, _2) // } +// let abi_decode_abi_decode_i_17_1073 := _2 // for { -// let abi_decode_abi_decode_i_17_1073 := _2 // } // lt(abi_decode_abi_decode_i_17_1073, abi_decode_abi_decode_length_14_1069) // { |