Index: include/llvm/Analysis/AliasSetTracker.h =================================================================== --- include/llvm/Analysis/AliasSetTracker.h +++ include/llvm/Analysis/AliasSetTracker.h @@ -37,8 +37,6 @@ class AliasSetTracker; class BasicBlock; class LoadInst; -class AnyMemSetInst; -class AnyMemTransferInst; class raw_ostream; class StoreInst; class VAArgInst; @@ -363,8 +361,6 @@ void add(LoadInst *LI); void add(StoreInst *SI); void add(VAArgInst *VAAI); - void add(AnyMemSetInst *MSI); - void add(AnyMemTransferInst *MTI); void add(Instruction *I); // Dispatch to one of the other add methods... void add(BasicBlock &BB); // Add all instructions in basic block void add(const AliasSetTracker &AST); // Add alias relations from another AST Index: include/llvm/IR/Intrinsics.td =================================================================== --- include/llvm/IR/Intrinsics.td +++ include/llvm/IR/Intrinsics.td @@ -401,7 +401,7 @@ [llvm_anyptr_ty, llvm_anyptr_ty, llvm_anyint_ty, llvm_i1_ty], [IntrArgMemOnly, NoCapture<0>, NoCapture<1>, - ReadOnly<1>]>; + WriteOnly<0>, ReadOnly<1>]>; def int_memset : Intrinsic<[], [llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, llvm_i1_ty], Index: lib/Analysis/AliasSetTracker.cpp =================================================================== --- lib/Analysis/AliasSetTracker.cpp +++ lib/Analysis/AliasSetTracker.cpp @@ -402,15 +402,6 @@ addPointer(MemoryLocation::get(VAAI), AliasSet::ModRefAccess); } -void AliasSetTracker::add(AnyMemSetInst *MSI) { - addPointer(MemoryLocation::getForDest(MSI), AliasSet::ModAccess); -} - -void AliasSetTracker::add(AnyMemTransferInst *MTI) { - addPointer(MemoryLocation::getForDest(MTI), AliasSet::ModAccess); - addPointer(MemoryLocation::getForSource(MTI), AliasSet::RefAccess); -} - void AliasSetTracker::addUnknown(Instruction *Inst) { if (isa(Inst)) return; // Ignore DbgInfo Intrinsics. @@ -448,10 +439,6 @@ return add(SI); if (VAArgInst *VAAI = dyn_cast(I)) return add(VAAI); - if (AnyMemSetInst *MSI = dyn_cast(I)) - return add(MSI); - if (AnyMemTransferInst *MTI = dyn_cast(I)) - return add(MTI); // Handle all calls with known mod/ref sets genericall CallSite CS(I); Index: lib/Analysis/MemoryLocation.cpp =================================================================== --- lib/Analysis/MemoryLocation.cpp +++ lib/Analysis/MemoryLocation.cpp @@ -123,6 +123,8 @@ case Intrinsic::memset: case Intrinsic::memcpy: case Intrinsic::memmove: + case Intrinsic::memcpy_element_unordered_atomic: + case Intrinsic::memmove_element_unordered_atomic: assert((ArgIdx == 0 || ArgIdx == 1) && "Invalid argument index for memory intrinsic"); if (ConstantInt *LenCI = dyn_cast(II->getArgOperand(2))) Index: test/Analysis/AliasSet/memtransfer.ll =================================================================== --- test/Analysis/AliasSet/memtransfer.ll +++ test/Analysis/AliasSet/memtransfer.ll @@ -209,5 +209,5 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1) declare void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32) -declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1) +declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1) declare void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32) Index: test/Bitcode/upgrade-memory-intrinsics.ll =================================================================== --- test/Bitcode/upgrade-memory-intrinsics.ll +++ test/Bitcode/upgrade-memory-intrinsics.ll @@ -29,7 +29,7 @@ ; CHECK: declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1) ; CHECK: declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1) -; CHECK: declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1) +; CHECK: declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1) declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i32, i1) declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly , i8* nocapture readonly, i64, i32, i1) declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1)