aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-04 22:56:29 +0000
committerDan Gohman <gohman@apple.com>2010-08-04 22:56:29 +0000
commit3dcc91ee8c48f210d302937ecbbf0d277f8b656e (patch)
tree51a96163cfbba2cd870af97f498c96bd4776d518 /test/Analysis
parentabf7bdffd67689781a5104b13fa806b92f3e96e1 (diff)
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
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/BasicAA/args-rets-allocas-loads.ll8
-rw-r--r--test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll12
2 files changed, 16 insertions, 4 deletions
diff --git a/test/Analysis/BasicAA/args-rets-allocas-loads.ll b/test/Analysis/BasicAA/args-rets-allocas-loads.ll
index 5d3f67ebe1..42893d8120 100644
--- a/test/Analysis/BasicAA/args-rets-allocas-loads.ll
+++ b/test/Analysis/BasicAA/args-rets-allocas-loads.ll
@@ -302,9 +302,9 @@ define void @caller_a(double* %arg_a0,
; CHECK: 36 may alias responses (30.0%)
; CHECK: 0 must alias responses (0.0%)
; CHECK: Alias Analysis Evaluator Pointer Alias Summary: 70%/30%/0%
-; CHECK: 128 Total ModRef Queries Performed
-; CHECK: 44 no mod/ref responses (34.3%)
+; CHECK: 184 Total ModRef Queries Performed
+; CHECK: 44 no mod/ref responses (23.9%)
; CHECK: 0 mod responses (0.0%)
; CHECK: 0 ref responses (0.0%)
-; CHECK: 84 mod & ref responses (65.6%)
-; CHECK: Alias Analysis Evaluator Mod/Ref Summary: 34%/0%/0%/65%
+; CHECK: 140 mod & ref responses (76.0%)
+; CHECK: Alias Analysis Evaluator Mod/Ref Summary: 23%/0%/0%/76%
diff --git a/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll b/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll
new file mode 100644
index 0000000000..4ee637ee1d
--- /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
+}