summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/BasicAA
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
commitbd33dab633b92e427db24858804053e895e70436 (patch)
treed9cdf43eb3418a6aa1ac5d6a2005ca703065988a /llvm/test/Analysis/BasicAA
parent8aaadea8ef135678bbb9520e074e5e68eeedcb7f (diff)
downloadbcm5719-llvm-bd33dab633b92e427db24858804053e895e70436.tar.gz
bcm5719-llvm-bd33dab633b92e427db24858804053e895e70436.zip
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. llvm-svn: 110270
Diffstat (limited to 'llvm/test/Analysis/BasicAA')
-rw-r--r--llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll8
-rw-r--r--llvm/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll12
2 files changed, 16 insertions, 4 deletions
diff --git a/llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll b/llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll
index 5d3f67ebe1a..42893d81203 100644
--- a/llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll
+++ b/llvm/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/llvm/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll b/llvm/test/Analysis/BasicAA/getmodrefinfo-cs-cs.ll
new file mode 100644
index 00000000000..4ee637ee1d6
--- /dev/null
+++ b/llvm/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
+}
OpenPOWER on IntegriCloud