]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ir.c
Adding strcat builtin to qcvm
[xonotic/gmqcc.git] / ir.c
diff --git a/ir.c b/ir.c
index 7312d7894ff7b3b0e002759cf2689f0f53f13653..6d436f1e5d8af305a9135c564577c3c6934329ee 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -609,7 +609,8 @@ bool ir_function_pass_peephole(ir_function *self)
                     if (inot->_ops[0] != value ||
                         inot->opcode < INSTR_NOT_F ||
                         inot->opcode > INSTR_NOT_FNC ||
-                        inot->opcode == INSTR_NOT_V) /* can't do this one */
+                        inot->opcode == INSTR_NOT_V || /* can't do these */
+                        inot->opcode == INSTR_NOT_S)
                     {
                         break;
                     }
@@ -3136,10 +3137,12 @@ static bool gen_function_locals(ir_builder *ir, ir_value *global)
     irfun = global->constval.vfunc;
     def   = code_functions + irfun->code_function_def;
 
-    if (opts.g || (irfun->flags & IR_FLAG_MASK_NO_OVERLAP))
+    if (opts.g || !OPTS_OPTIMIZATION(OPTIM_OVERLAP_LOCALS) || (irfun->flags & IR_FLAG_MASK_NO_OVERLAP))
         firstlocal = def->firstlocal = vec_size(code_globals);
-    else
+    else {
         firstlocal = def->firstlocal = ir->first_common_local;
+        ++opts_optimizationcount[OPTIM_OVERLAP_LOCALS];
+    }
 
     for (i = vec_size(code_globals); i < firstlocal + irfun->allocated_locals; ++i)
         vec_push(code_globals, 0);