summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/GlobalsModRef
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-09-03 15:31:24 +0000
committerDuncan Sands <baldrick@free.fr>2008-09-03 15:31:24 +0000
commit0eca0571f86ae7cea43a08985d7dcaa27effdbb2 (patch)
tree212aba4fb17a3a577dafc79dcc5cfeec14433c6a /llvm/test/Analysis/GlobalsModRef
parent42c644ef0317a0c2cfdde9d9186977b859a2b7b1 (diff)
downloadbcm5719-llvm-0eca0571f86ae7cea43a08985d7dcaa27effdbb2.tar.gz
bcm5719-llvm-0eca0571f86ae7cea43a08985d7dcaa27effdbb2.zip
Since onlyReadsMemory returns true if in fact
doesNotAccessMemory, check doesNotAccessMemory first, since otherwise functions may be marked readonly rather than readnone. llvm-svn: 55697
Diffstat (limited to 'llvm/test/Analysis/GlobalsModRef')
-rw-r--r--llvm/test/Analysis/GlobalsModRef/2008-09-03-ReadNone.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Analysis/GlobalsModRef/2008-09-03-ReadNone.ll b/llvm/test/Analysis/GlobalsModRef/2008-09-03-ReadNone.ll
new file mode 100644
index 00000000000..b286ada8390
--- /dev/null
+++ b/llvm/test/Analysis/GlobalsModRef/2008-09-03-ReadNone.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -globalsmodref-aa -markmodref | llvm-dis | grep readnone | count 2
+
+define i32 @f() {
+entry:
+ %tmp = call i32 @e( ) ; <i32> [#uses=1]
+ ret i32 %tmp
+}
+
+declare i32 @e() readnone
OpenPOWER on IntegriCloud