aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-05-01 15:05:56 +0100
committerGinger Bill <bill@gingerbill.org>2017-05-01 15:05:56 +0100
commitfae5df2ed8663d52c691802a7c11105ea28267ed (patch)
tree15e9e07fa6bbe1f85b8c221c1fd14e45c6bf89ac /src
parent01d9161772270aab523cea47f02db26e95218b43 (diff)
Fix IR vector arith conv bug
Diffstat (limited to 'src')
-rw-r--r--src/ir.c2
1 files changed, 2 insertions, 0 deletions
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));