Skip to content

Commit

Permalink
Merge 3384357 into 2193895
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Aug 7, 2024
2 parents 2193895 + 3384357 commit 96cc7dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4286,9 +4286,9 @@ static jl_cgval_t emit_memoryref(jl_codectx_t &ctx, const jl_cgval_t &ref, jl_cg
ovflw = ctx.builder.CreateICmpUGE(ctx.builder.CreateAdd(offset, mlen), ctx.builder.CreateNUWAdd(mlen, mlen));
}
#endif
//Is this change fine
boffset = ctx.builder.CreateMul(offset, elsz);
newdata = ctx.builder.CreateGEP(getInt8Ty(ctx.builder.getContext()), data, boffset);
// boffset = ctx.builder.CreateMul(offset, elsz);
Type *elty = isboxed ? ctx.types().T_prjlvalue : julia_type_to_llvm(ctx, jl_tparam1(ref.typ));
newdata = ctx.builder.CreateInBoundsGEP(elty, data, offset);
(void)boffset; // LLVM is very bad at handling GEP with types different from the load
if (bc) {
BasicBlock *failBB, *endBB;
Expand Down

0 comments on commit 96cc7dc

Please sign in to comment.