The two-callsite form of AliasAnalysis::getModRefInfo is documented
to return Ref if the left callsite only reads memory read or written
by the right callsite; fix BasicAliasAnalysis to implement this.
Add AliasAnalysisEvaluator support for testing the two-callsite
form of getModRefInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110270 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll
new file mode 100644
index 0000000..4ee637e
--- /dev/null
+++ b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll
@@ -0,0 +1,12 @@
+; RUN: opt < %s -aa-eval -print-all-alias-modref-info -disable-output |& FileCheck %s
+
+; CHECK: {{[[:<:]]}}Ref: call void @ro() <-> call void @f0()
+
+declare void @f0()
+declare void @ro() readonly
+
+define void @test() {
+ call void @f0()
+ call void @ro()
+ ret void
+}