[PATCH] D67562: [MemorySSA] Update MSSA for non-conventional AA.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 17:28:17 PDT 2019
asbirlea updated this revision to Diff 220195.
asbirlea added a comment.
Make the update in MemorySSA.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67562/new/
https://reviews.llvm.org/D67562
Files:
lib/Analysis/MemorySSA.cpp
test/Analysis/MemorySSA/loop-rotate-disablebasicaa.ll
Index: test/Analysis/MemorySSA/loop-rotate-disablebasicaa.ll
===================================================================
--- /dev/null
+++ test/Analysis/MemorySSA/loop-rotate-disablebasicaa.ll
@@ -0,0 +1,23 @@
+; RUN: opt -disable-basicaa -loop-rotate -enable-mssa-loop-dependency -verify-memoryssa -S < %s | FileCheck %s
+; REQUIRES: asserts
+
+; CHECK-LABEL: @main
+define void @main() {
+entry:
+ br label %for.cond120
+
+for.cond120: ; preds = %for.body127, %entry
+ call void @foo()
+ br i1 undef, label %for.body127, label %for.cond.cleanup126
+
+for.cond.cleanup126: ; preds = %for.cond120
+ unreachable
+
+for.body127: ; preds = %for.cond120
+ %0 = load i16**, i16*** undef, align 1
+ br label %for.cond120
+}
+
+declare void @foo() readnone
+
+
Index: lib/Analysis/MemorySSA.cpp
===================================================================
--- lib/Analysis/MemorySSA.cpp
+++ lib/Analysis/MemorySSA.cpp
@@ -1739,6 +1739,9 @@
if (II->getIntrinsicID() == Intrinsic::assume || isa<DbgInfoIntrinsic>(II))
return nullptr;
+ if (!I->mayReadFromMemory() && !I->mayWriteToMemory())
+ return nullptr;
+
bool Def, Use;
if (Template) {
Def = dyn_cast_or_null<MemoryDef>(Template) != nullptr;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67562.220195.patch
Type: text/x-patch
Size: 1343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190914/15b574ce/attachment.bin>
More information about the llvm-commits
mailing list