[PATCH] D17037: [MemoryBuiltins] Fix an issue with hasNoAliasAttr

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 13:37:43 PST 2016


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

LGTM w/optional comments.

As a test case consider:
%p = ...
load from %p
%p2 = malloc()
load from %p

GVN?  Not sure this will actually work, but worth trying.


================
Comment at: lib/Analysis/MemoryBuiltins.cpp:147
@@ -146,3 +146,3 @@
   ImmutableCallSite CS(LookThroughBitCast ? V->stripPointerCasts() : V);
-  return CS && CS.hasFnAttr(Attribute::NoAlias);
 }
----------------
Can you add an assert inside the attribute mechanism that would have caught this?


http://reviews.llvm.org/D17037





More information about the llvm-commits mailing list