[PATCH] D29216: Fix BasicAA incorrect assumption on GEP

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 06:04:08 PST 2017


hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.

LGTM. This should go into the branch too.



================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:1194
     AliasResult R = aliasCheck(UnderlyingV1, MemoryLocation::UnknownSize,
-                               AAMDNodes(), V2, V2Size, V2AAInfo,
-                               nullptr, UnderlyingV2);
+                               AAMDNodes(), V2, MemoryLocation::UnknownSize,
+                               V2AAInfo, nullptr, UnderlyingV2);
----------------
I had to look at this for a few moments to realize why this was broken: UnknownSize might be unknown, but it is still assumed to be positive, so we only get a one-sided range. Thus, we must use UnknownSize for both sizes.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/tiny-tree.ll:5
 
-
 ; CHECK: tiny_tree_fully_vectorizable
----------------
We don't need to touch this file now.


https://reviews.llvm.org/D29216





More information about the llvm-commits mailing list