[GVN] small improvements to comments
authorJameson Nash <vtjnash@gmail.com>
Tue, 3 Nov 2020 18:17:52 +0000 (13:17 -0500)
committerJameson Nash <vtjnash@gmail.com>
Tue, 3 Nov 2020 18:21:48 +0000 (13:21 -0500)
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/lib/Transforms/Utils/VNCoercion.cpp

index d5fc020..f2c12f2 100644 (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))
index 11b42ec..3adb9d4 100644 (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;
 }