                 scope = LoopExitableScope.findLabeled n.label.name
                 # XXX check if scope is null, throw if so
                 scope.exitFore()
+
+        generateCondBr: (exp, then_bb, else_bb) ->
+                exp_value = @visit exp
+                cond_truthy = @createCall @ejs_runtime.truthy, [exp_value], "cond_truthy"
+                cmp = ir.createICmpEq cond_truthy, consts.false(), "cmpresult"
+                ir.createCondBr cmp, else_bb, then_bb
+                exp_value
                 
         visitFor: (n) ->
                 insertBlock = ir.getInsertBlock()


                @doInsideBlock test_bb, =>
                        if n.test
                                cond_truthy = @createCall @ejs_runtime.truthy, [@visit(n.test)], "cond_truthy"
                                cmp = ir.createICmpEq cond_truthy, consts.false(), "cmpresult"
                                ir.createCondBr cmp, merge_bb, body_bb
                        else
                                ir.createBr body_bb


                debug.log -> "operator = '#{n.operator}'"
                result = @createAlloca @currentFunction, types.EjsValue, "result_#{n.operator}"

                insertBlock = ir.getInsertBlock()
                insertFunc = insertBlock.parent
        
