diff options
author | Duncan Sands <baldrick@free.fr> | 2008-09-03 15:31:24 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-09-03 15:31:24 +0000 |
commit | d0ac373660de64fe210e50458c7702432b3f9605 (patch) | |
tree | 4e4a4900da55efe996274d087096cb54c26b6f06 /test/Analysis | |
parent | 9a036b945c67aeb44093c6c515e4b85e21094335 (diff) | |
download | external_llvm-d0ac373660de64fe210e50458c7702432b3f9605.zip external_llvm-d0ac373660de64fe210e50458c7702432b3f9605.tar.gz external_llvm-d0ac373660de64fe210e50458c7702432b3f9605.tar.bz2 |
Since onlyReadsMemory returns true if in fact
doesNotAccessMemory, check doesNotAccessMemory
first, since otherwise functions may be
marked readonly rather than readnone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/GlobalsModRef/2008-09-03-ReadNone.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Analysis/GlobalsModRef/2008-09-03-ReadNone.ll b/test/Analysis/GlobalsModRef/2008-09-03-ReadNone.ll new file mode 100644 index 0000000..b286ada --- /dev/null +++ b/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 |