diff options
author | Florian Hahn <flo@fhahn.com> | 2021-12-04 22:18:38 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2021-12-04 22:18:39 +0000 |
commit | a9125792b3be19c40cf1ffbe17b0bd3cc0920fcc (patch) | |
tree | 72cd5971015493b172d3be371d58f080a305ae6e /llvm/lib/Analysis/MemoryLocation.cpp | |
parent | 91072b74f859e1dbd10673d47dcfb911e3041b77 (diff) | |
download | llvm-a9125792b3be19c40cf1ffbe17b0bd3cc0920fcc.zip llvm-a9125792b3be19c40cf1ffbe17b0bd3cc0920fcc.tar.gz llvm-a9125792b3be19c40cf1ffbe17b0bd3cc0920fcc.tar.bz2 |
[MemoryLocation] Support missing atomic intrinsics in getForArg.
getForArgument is missing support for atomic memory transfer
intrinsics. In terms of accessed locations they behave like regular
memory transfer intrinsics and we already support them as such in
getForSource/getForDest.
Diffstat (limited to 'llvm/lib/Analysis/MemoryLocation.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemoryLocation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/MemoryLocation.cpp b/llvm/lib/Analysis/MemoryLocation.cpp index 44136a7..3d068c4 100644 --- a/llvm/lib/Analysis/MemoryLocation.cpp +++ b/llvm/lib/Analysis/MemoryLocation.cpp @@ -177,6 +177,9 @@ MemoryLocation MemoryLocation::getForArgument(const CallBase *Call, case Intrinsic::memcpy: case Intrinsic::memcpy_inline: case Intrinsic::memmove: + case Intrinsic::memcpy_element_unordered_atomic: + case Intrinsic::memmove_element_unordered_atomic: + case Intrinsic::memset_element_unordered_atomic: assert((ArgIdx == 0 || ArgIdx == 1) && "Invalid argument index for memory intrinsic"); if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getArgOperand(2))) @@ -236,6 +239,10 @@ MemoryLocation MemoryLocation::getForArgument(const CallBase *Call, II->getArgOperand(1)->getType())), AATags); } + + assert( + !isa<AnyMemTransferInst>(II) && + "all memory transfer intrinsics should be handled by the switch above"); } // We can bound the aliasing properties of memset_pattern16 just as we can |