]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
Only when peephole optimization is on
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index 5ea6d93b2f51a34f06bfe42fc25627f39f4111e4..4c142039ed281b57a7df94a1b113f491c2566fd9 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -454,7 +454,7 @@ ast_binary* ast_binary_new(lex_ctx_t ctx, int op,
      * Try to fold away superfluous binary operations, such as:
      * A * 1, a + 0, etc.
      */
-    if ((fold = (ast_binary*)fold_superfluous(left, right, op))) {
+    if (OPTS_OPTIMIZATION(OPTIM_PEEPHOLE) && (fold = (ast_binary*)fold_superfluous(left, right, op))) {
         ast_binary_delete(self);
         return fold;
     }