[PATCH] D15880: [BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 20:46:39 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL256910: [BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI] (authored by reames).

Changed prior to commit:
  http://reviews.llvm.org/D15880?vs=43952&id=44084#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D15880

Files:
  llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp

Index: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
===================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
@@ -599,9 +599,11 @@
     case Intrinsic::memset:
     case Intrinsic::memcpy:
     case Intrinsic::memmove:
-      assert((ArgIdx == 0 || ArgIdx == 1) &&
-             "Invalid argument index for memory intrinsic");
-      return ArgIdx ? MRI_Ref : MRI_Mod;
+      // We don't currently have a writeonly attribute.  All other properties
+      // of these intrinsics are nicely described via attributes in
+      // Intrinsics.td and handled generically below.
+      if (ArgIdx == 0)
+        return MRI_Mod;
     }
 
   // We can bound the aliasing properties of memset_pattern16 just as we can


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15880.44084.patch
Type: text/x-patch
Size: 822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160106/a8440d3e/attachment.bin>


More information about the llvm-commits mailing list