diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-09-25 22:59:59 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-09-25 22:59:59 +0100 |
| commit | b77ea94976aa14f40e416b8c51769e291c79b82c (patch) | |
| tree | 5021e893c12447eddee24f9c8b42ac608a258748 /src/ir.cpp | |
| parent | ae17a51c0dc1e488fb4241323c9eafdae632fd34 (diff) | |
Fix issue #108
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 29152e5b6..97b8f787d 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -4761,6 +4761,16 @@ irValue *ir_build_expr(irProcedure *proc, AstNode *expr) { case Token_CmpAnd: case Token_CmpOr: + if (is_type_vector(type)) { + TokenKind op = {}; + switch (be->op.kind) { + case Token_CmpAnd: op = Token_And; break; + case Token_CmpOr: op = Token_Or; break; + } + irValue *right = ir_build_expr(proc, be->right); + return ir_emit_arith(proc, op, left, right, type); + } + return ir_emit_logical_binary_expr(proc, expr); default: |