Skip to content

Commit d44283b

Browse files
committed
update compiler optimizations
1 parent 4c382db commit d44283b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/compiler-optimizations.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ Enables special optimizations for mathematical operations.
6565
- Eliminates neutral binary expressions such as such as addition/subtraction with the constant-zero.
6666
- Eliminates runtime overflow checking for binary shifing expressions if right operand is constant.
6767
- Eliminates runtime overflow of the `x^0` computations. It will be simplified to `x` expression.
68+
- Simplifies expresions such as `x+x` to `x<<1` if possible.
69+
- Simplifies expressions such as `x-x` to `0` if possible.
6870

6971
---
7072

0 commit comments

Comments
 (0)