Skip to content

Commit

Permalink
Codegen: don't pun float func arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
xal-0 committed Feb 14, 2025
1 parent 4eb0368 commit 1bd20ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1434,10 +1434,13 @@ static jl_cgval_t emit_intrinsic(jl_codectx_t &ctx, intrinsic f, jl_value_t **ar
if (!jl_is_primitivetype(xinfo.typ))
return emit_runtime_call(ctx, f, argv, nargs);
Type *xtyp = bitstype_to_llvm(xinfo.typ, ctx.builder.getContext(), true);
if (float_func()[f])
xtyp = FLOATT(xtyp);
else
if (float_func()[f]) {
if (!xtyp->isFloatingPointTy())
return emit_runtime_call(ctx, f, argv, nargs);
}
else {
xtyp = INTT(xtyp, DL);
}
if (!xtyp)
return emit_runtime_call(ctx, f, argv, nargs);
////Bool are required to be in the range [0,1]
Expand Down

0 comments on commit 1bd20ce

Please sign in to comment.