[llvm] d370836 - [MemorySSA] Assert defining access is not a MemoryUse.
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 18:21:44 PDT 2020
Author: Alina Sbirlea
Date: 2020-08-27T18:21:10-07:00
New Revision: d370836c20c58c9092efbd1b2ee9002ab500af55
URL: https://github.com/llvm/llvm-project/commit/d370836c20c58c9092efbd1b2ee9002ab500af55
DIFF: https://github.com/llvm/llvm-project/commit/d370836c20c58c9092efbd1b2ee9002ab500af55.diff
LOG: [MemorySSA] Assert defining access is not a MemoryUse.
Added:
Modified:
llvm/lib/Analysis/MemorySSA.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index 6fc827ae2b17..f54f04460a4d 100644
--- a/llvm/lib/Analysis/MemorySSA.cpp
+++ b/llvm/lib/Analysis/MemorySSA.cpp
@@ -1726,8 +1726,11 @@ MemoryUseOrDef *MemorySSA::createDefinedAccess(Instruction *I,
if (CreationMustSucceed)
assert(NewAccess != nullptr && "Tried to create a memory access for a "
"non-memory touching instruction");
- if (NewAccess)
+ if (NewAccess) {
+ assert((!Definition || !isa<MemoryUse>(Definition)) &&
+ "A use cannot be a defining access");
NewAccess->setDefiningAccess(Definition);
+ }
return NewAccess;
}
More information about the llvm-commits
mailing list