Skip to content

Commit 0f35959

Browse files
pchintalapudikpamnany
authored andcommitted
Fix MemorySSA bug, broken julia-licm test (#49900)
1 parent adad7de commit 0f35959

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/llvm-julia-licm.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -291,20 +291,6 @@ struct JuliaLICM : public JuliaPassContext {
291291
}
292292
changed = true;
293293
}
294-
IRBuilder<> builder(preheader->getTerminator());
295-
builder.SetCurrentDebugLocation(call->getDebugLoc());
296-
auto obj_i8 = builder.CreateBitCast(call, Type::getInt8PtrTy(call->getContext(), call->getType()->getPointerAddressSpace()));
297-
// Note that this alignment is assuming the GC allocates at least pointer-aligned memory
298-
auto align = Align(DL.getPointerSize(0));
299-
auto clear_obj = builder.CreateMemSet(obj_i8, ConstantInt::get(Type::getInt8Ty(call->getContext()), 0), call->getArgOperand(1), align);
300-
if (MSSAU.getMemorySSA()) {
301-
auto alloc_mdef = MSSAU.getMemorySSA()->getMemoryAccess(call);
302-
assert(isa<MemoryDef>(alloc_mdef) && "Expected alloc to be associated with a memory def!");
303-
auto clear_mdef = MSSAU.createMemoryAccessAfter(clear_obj, nullptr, alloc_mdef);
304-
assert(isa<MemoryDef>(clear_mdef) && "Expected memset to be associated with a memory def!");
305-
(void) clear_mdef;
306-
}
307-
changed = true;
308294
}
309295
}
310296
}

0 commit comments

Comments
 (0)