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
5 changes: 5 additions & 0 deletions llvm/lib/Transforms/Utils/VNCoercion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ int analyzeLoadFromClobberingMemInst(Type *LoadTy, Value *LoadPtr,
ConstantInt *SizeCst = dyn_cast<ConstantInt>(MI->getLength());
if (!SizeCst)
return -1;
// If this is a pointer type that's larger than the largest integer that we
// support, then ignore it.
if (LoadTy->isPointerTy() &&
DL.getTypeSizeInBits(LoadTy) > DL.getLargestLegalIntTypeSizeInBits())
return -1;
uint64_t MemSizeInBits = SizeCst->getZExtValue() * 8;

// If this is memset, we just need to see if the offset is valid in the size
Expand Down
Loading