From d44283bbe0ac466069befc6e2f2ace8d72f757b0 Mon Sep 17 00:00:00 2001 From: mertcandav Date: Sun, 13 Oct 2024 17:47:46 +0300 Subject: [PATCH] update compiler optimizations --- src/compiler/compiler-optimizations.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/compiler-optimizations.md b/src/compiler/compiler-optimizations.md index ee57893..7782719 100644 --- a/src/compiler/compiler-optimizations.md +++ b/src/compiler/compiler-optimizations.md @@ -65,6 +65,8 @@ Enables special optimizations for mathematical operations. - Eliminates neutral binary expressions such as such as addition/subtraction with the constant-zero. - Eliminates runtime overflow checking for binary shifing expressions if right operand is constant. - Eliminates runtime overflow of the `x^0` computations. It will be simplified to `x` expression. +- Simplifies expresions such as `x+x` to `x<<1` if possible. +- Simplifies expressions such as `x-x` to `0` if possible. ---