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

Michael Zolotukhin via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 16:51:10 PST 2015


mzolotukhin added inline comments.

================
Comment at: lib/Analysis/ValueTracking.cpp:3302
@@ -3301,2 +3301,3 @@
 
-    if (Offset.isNonNegative())
+    // Don't deal with opaque types - we don't know whether they're aligned or
+    // not.
----------------
reames wrote:
> Why are opaque types considered sized?  If they're opaque and we don't yet have a body, how can they be sized?  That seems like the root of the problem here.
The type of `V` isn't sized and isn't opaque. However, the type of `BV` is opaque, and we don't check if it's sized.

I could replace the new check with `isSized()`, that might be better.


http://reviews.llvm.org/D15597





More information about the llvm-commits mailing list