aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 197909a1..dbf96f34 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -1376,6 +1376,7 @@ fn trans_index(@block_ctxt cx, &ast.span sp, @ast.expr base,
auto lim = ix.bcx.build.GEP(v, vec(C_int(0), C_int(abi.vec_elt_fill)));
lim = ix.bcx.build.Load(lim);
+
auto bounds_check = ix.bcx.build.ICmp(lib.llvm.LLVMIntULT,
scaled_ix, lim);
@@ -1582,6 +1583,10 @@ impure fn trans_vec(@block_ctxt cx, vec[@ast.expr] args,
sub = copy_ty(src_res.bcx, true, dst_elt, src_res.val, unit_ty);
i += 1;
}
+ auto fill = sub.bcx.build.GEP(vec_val,
+ vec(C_int(0), C_int(abi.vec_elt_fill)));
+ sub.bcx.build.Store(data_sz, fill);
+
ret res(sub.bcx, vec_val);
}