More bug fixes and dead code elimination
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index a23aa75667710d23f7268ee565a9aa9a30c52150..584bda0714a5f923524ff828c66eaa6919ac9c84 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -2893,10 +2893,13 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
     if (bprecond)
     {
         ir_block *ontrue, *onfalse;
-        if      (bbody)      ontrue = bbody;
+        ontrue = bbody; /* can never be null */
+
+        /* all of this is dead code 
         else if (bincrement) ontrue = bincrement;
-        else if (bpostcond)  ontrue = bpostcond;
-        else                 ontrue = bprecond;
+        else                 ontrue = bpostcond;
+        */
+
         onfalse = bout;
         if (self->pre_not) {
             tmpblock = ontrue;