[PATCH] D9151: Loop Versioning for LICM

Ashutosh Nema via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 00:49:48 PST 2015

ashutosh.nema added a comment.

Hi Hal,

Will work on your comments and come back.


Comment at: lib/Transforms/Scalar/LoopVersioningLICM.cpp:323
@@ +322,3 @@
+    // At least one alias tracker should have pointers of same data type.
+    TypeSafety |= typeCheck;
+  }
hfinkel wrote:
> You're checking here that all points in the given alias set have the same type; why?
Actually this is a pre-condition in LICM’s “promoteLoopAccessesToScalars” 
where it expects all pointers in alias should have same type.

881     // Check that all of the pointers in the alias set have the same type.  We
882     // cannot (yet) promote a memory location that is loaded and stored in
883     // different sizes.
884     if (SomePtr->getType() != ASIV->getType())
885       return Changed;

To confirm same behaviour we added this check.



More information about the llvm-commits mailing list