From: Philip Reames Date: Wed, 6 Jan 2016 04:43:03 +0000 (+0000) Subject: [BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI] X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=719759b2faa42655f5dc28091ca6faf90b262561;p=oota-llvm.git [BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI] We only need to describe the writeonly property of one of the arguments. All of the rest of the semantics are nicely described by existing attributes in Intrinsics.td. Differential Revision: http://reviews.llvm.org/D15880 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256910 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 00f346ea115..ace596dc5f6 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -599,9 +599,11 @@ ModRefInfo BasicAAResult::getArgModRefInfo(ImmutableCallSite CS, 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