aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2018-04-10 13:23:10 -0700
committerPirama Arumuga Nainar <pirama@google.com>2018-04-10 13:23:10 -0700
commite8594d5184f397e9cad4e7803f47894107bdd3f4 (patch)
treeb90a3c9167826a02ab0352d535089d1a9e397df5
parent111055a9fe97192942044a08b63f9b3fae896d0c (diff)
downloadllvm-e8594d5184f397e9cad4e7803f47894107bdd3f4.tar.gz
[MemorySSA] Be less aggressive with @llvm.lifetime.start
This is a workaround to keep LLVM from incorrectly removing stores in rare cases. It has not yet been committed, and -- due to the direction we seem to want to take MSSA in -- probably never will be. It should be sufficient to work around the problem until we agree on a good way forward. Additional context: https://reviews.llvm.org/D43269 This is rebased to r327695 by gbiv@chromium.org. Change-Id: Ib78a9e12845a28a48bbc4154e89775b1ef4b5319
-rw-r--r--lib/Analysis/MemorySSA.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/MemorySSA.cpp b/lib/Analysis/MemorySSA.cpp
index c8fef6a1f16..0c5bff09ba8 100644
--- a/lib/Analysis/MemorySSA.cpp
+++ b/lib/Analysis/MemorySSA.cpp
@@ -257,13 +257,13 @@ static ClobberAlias instructionClobbersQuery(MemoryDef *MD,
if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(DefInst)) {
// These intrinsics will show up as affecting memory, but they are just
- // markers.
+ // markers, mostly.
switch (II->getIntrinsicID()) {
case Intrinsic::lifetime_start:
if (UseCS)
return {false, NoAlias};
AR = AA.alias(MemoryLocation(II->getArgOperand(1)), UseLoc);
- return {AR == MustAlias, AR};
+ return {AR != NoAlias, AR};
case Intrinsic::lifetime_end:
case Intrinsic::invariant_start:
case Intrinsic::invariant_end: