[PATCH] D15597: [ValueTracking] Handle opaque types in isDereferenceableAndAlignedPointer.

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 17:26:53 PST 2015


mzolotukhin added inline comments.

================
Comment at: lib/Analysis/ValueTracking.cpp:3302-3303
@@ -3301,3 +3301,4 @@
 
-    if (Offset.isNonNegative())
+    if (BV->getType()->getPointerElementType()->isSized() &&
+        Offset.isNonNegative())
       if (isDereferenceableFromAttribute(BV, Offset, Ty, DL, CtxI, DT, TLI) &&
----------------
I updated the check to `isSized`.

I'm not well familiar with this code, so I don't have strong opinion on whether these checks are worth pulling in or not. It seems useful though.


http://reviews.llvm.org/D15597





More information about the llvm-commits mailing list