Browse Source

Fix IR vector arith conv bug

Ginger Bill 8 years ago
parent
commit
fae5df2ed8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/ir.c

+ 2 - 0
src/ir.c

@@ -1820,6 +1820,8 @@ irValue *ir_emit_arith(irProcedure *proc, TokenKind op, irValue *left, irValue *
 		ir_emit_comment(proc, str_lit("vector.arith.begin"));
 		// IMPORTANT TODO(bill): This is very wasteful with regards to stack memory
 		Type *tl = base_type(t_left);
+		left  = ir_emit_conv(proc, left, type);
+		right = ir_emit_conv(proc, right, type);
 		irValue *lhs = ir_address_from_load_or_generate_local(proc, left);
 		irValue *rhs = ir_address_from_load_or_generate_local(proc, right);
 		GB_ASSERT(is_type_vector(type));