Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,11 +1054,7 @@ bool MemCpyOptPass::performCallSlotOptzn(Instruction *cpyLoad,
// the use analysis, we also need to know that it does not sneakily
// access dest. We rely on AA to figure this out for us.
MemoryLocation DestWithSrcSize(cpyDest, LocationSize::precise(srcSize));
ModRefInfo MR = BAA.getModRefInfo(C, DestWithSrcSize);
// If necessary, perform additional analysis.
if (isModOrRefSet(MR))
MR = BAA.callCapturesBefore(C, DestWithSrcSize, DT);
if (isModOrRefSet(MR))
if (isModOrRefSet(BAA.getModRefInfo(C, DestWithSrcSize)))
return false;

// We can't create address space casts here because we don't know if they're
Expand Down