From fae5df2ed8663d52c691802a7c11105ea28267ed Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Mon, 1 May 2017 15:05:56 +0100 Subject: [PATCH] Fix IR vector arith conv bug --- src/ir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ir.c b/src/ir.c index 3be446e50..2a7a3a6f4 100644 --- a/src/ir.c +++ b/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));