diff --git a/libyul/optimiser/CommonSubexpressionEliminator.h b/libyul/optimiser/CommonSubexpressionEliminator.h index 08554fe17..7099ad181 100644 --- a/libyul/optimiser/CommonSubexpressionEliminator.h +++ b/libyul/optimiser/CommonSubexpressionEliminator.h @@ -25,7 +25,7 @@ #include #include -#include +#include namespace solidity::yul { diff --git a/test/libyul/yulOptimizerTests/commonSubexpressionEliminator/replace_return_nonzero.yul b/test/libyul/yulOptimizerTests/commonSubexpressionEliminator/replace_return_nonzero.yul new file mode 100644 index 000000000..8c6096629 --- /dev/null +++ b/test/libyul/yulOptimizerTests/commonSubexpressionEliminator/replace_return_nonzero.yul @@ -0,0 +1,20 @@ +{ + function f() -> x { + let t := 0 + x := 1 + let a := 0 + let b := 1 + } +} +// ---- +// step: commonSubexpressionEliminator +// +// { +// function f() -> x +// { +// let t := 0 +// x := 1 +// let a := t +// let b := x +// } +// }