[GVN] small improvements to comments

This commit is contained in:
Jameson Nash 2020-11-03 13:17:52 -05:00
parent 16dd69347d
commit 59a6ab28c4
2 changed files with 3 additions and 3 deletions

View File

@ -1042,7 +1042,7 @@ bool GVN::AnalyzeLoadAvailability(LoadInst *LI, MemDepResult DepInfo,
if (StoreInst *S = dyn_cast<StoreInst>(DepInst)) {
// Reject loads and stores that are to the same address but are of
// different types if we have to. If the stored value is larger or equal to
// different types if we have to. If the stored value is convertable to
// the loaded value, we can reuse it.
if (!canCoerceMustAliasedValueToLoad(S->getValueOperand(), LI->getType(),
DL))

View File

@ -50,12 +50,12 @@ bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy,
// The implementation below uses inttoptr for vectors of unequal size; we
// can't allow this for non integral pointers. Wecould teach it to extract
// can't allow this for non integral pointers. We could teach it to extract
// exact subvectors if desired.
if (DL.isNonIntegralPointerType(StoredTy->getScalarType()) &&
StoreSize != DL.getTypeSizeInBits(LoadTy).getFixedSize())
return false;
return true;
}