Ginger Bill 8 years ago
parent
commit
b77ea94976
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/ir.cpp

+ 10 - 0
src/ir.cpp

@@ -4761,6 +4761,16 @@ irValue *ir_build_expr(irProcedure *proc, AstNode *expr) {
 
 
 		case Token_CmpAnd:
 		case Token_CmpAnd:
 		case Token_CmpOr:
 		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);
 			return ir_emit_logical_binary_expr(proc, expr);
 
 
 		default:
 		default: