Skip to content

Commit

Permalink
codegen: handle dead code with unsafe_store of FCA pointers
Browse files Browse the repository at this point in the history
Fix #50125
  • Loading branch information
vtjnash committed Jun 14, 2023
1 parent 834aad4 commit fdeb8b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ static jl_cgval_t emit_pointerref(jl_codectx_t &ctx, jl_cgval_t *argv)
ai.decorateInst(load);
return mark_julia_type(ctx, load, true, ety);
}
else if (!jl_isbits(ety)) {
else if (!deserves_stack(ety)) {
assert(jl_is_datatype(ety));
uint64_t size = jl_datatype_size(ety);
Value *strct = emit_allocobj(ctx, (jl_datatype_t*)ety);
Expand Down Expand Up @@ -747,7 +747,7 @@ static jl_cgval_t emit_pointerset(jl_codectx_t &ctx, jl_cgval_t *argv)
jl_aliasinfo_t ai = jl_aliasinfo_t::fromTBAA(ctx, ctx.tbaa().tbaa_data);
ai.decorateInst(store);
}
else if (!jl_isbits(ety)) {
else if (x.ispointer()) {
thePtr = emit_unbox(ctx, getInt8PtrTy(ctx.builder.getContext()), e, e.typ);
uint64_t size = jl_datatype_size(ety);
im1 = ctx.builder.CreateMul(im1, ConstantInt::get(ctx.types().T_size,
Expand Down

0 comments on commit fdeb8b0

Please sign in to comment.