Skip to content

Commit

Permalink
handle narg==4 for runtime-intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Sep 13, 2016
1 parent 5b42d81 commit fb12337
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,18 @@ static jl_cgval_t emit_intrinsic(intrinsic f, jl_value_t **args, size_t nargs,
r = builder.CreateCall(func, {x, y, z});
#else
r = builder.CreateCall3(func, x, y, z);
#endif
}
else if (nargs == 4) {
Value *x = boxed(emit_expr(args[1], ctx), ctx);
Value *y = boxed(emit_expr(args[2], ctx), ctx);
Value *z = boxed(emit_expr(args[3], ctx), ctx);
Value *w = boxed(emit_expr(args[4], ctx), ctx);

#ifdef LLVM37
r = builder.CreateCall(func, {x, y, z, w});
#else
r = builder.CreateCall4(func, x, y, z, w);
#endif
}
else {
Expand Down

0 comments on commit fb12337

Please sign in to comment.