Skip to content

Commit 3d682bd

Browse files
authored
Revert "codgen: make the Memory GEP an inbounds GEP (#55107)"
This reverts commit 7e1f0be.
1 parent 39f2ad1 commit 3d682bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cgutils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4280,8 +4280,9 @@ static jl_cgval_t emit_memoryref(jl_codectx_t &ctx, const jl_cgval_t &ref, jl_cg
42804280
ovflw = ctx.builder.CreateICmpUGE(ctx.builder.CreateAdd(offset, mlen), ctx.builder.CreateNUWAdd(mlen, mlen));
42814281
}
42824282
#endif
4283+
//Is this change fine
42834284
boffset = ctx.builder.CreateMul(offset, elsz);
4284-
newdata = ctx.builder.CreateInBoundsGEP(getInt8Ty(ctx.builder.getContext()), data, boffset);
4285+
newdata = ctx.builder.CreateGEP(getInt8Ty(ctx.builder.getContext()), data, boffset);
42854286
(void)boffset; // LLVM is very bad at handling GEP with types different from the load
42864287
if (bc) {
42874288
BasicBlock *failBB, *endBB;

0 commit comments

Comments
 (0)