summaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-08 23:57:34 +0000
committerChris Lattner <sabre@nondot.org>2005-05-08 23:57:34 +0000
commit20fad44ede55d9996a7d8a8f9012b763d7b7c601 (patch)
tree6103b8d5d3b474befd9c62d831b832ef5125c1f0 /test/Analysis
parent37c121acf4fc347d9feff892598f79b1940f2875 (diff)
downloadllvm-20fad44ede55d9996a7d8a8f9012b763d7b7c601.tar.gz
llvm-20fad44ede55d9996a7d8a8f9012b763d7b7c601.tar.bz2
llvm-20fad44ede55d9996a7d8a8f9012b763d7b7c601.tar.xz
New testacse for information exposed by the 'tail' call marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/BasicAA/tailcall-modref.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Analysis/BasicAA/tailcall-modref.ll b/test/Analysis/BasicAA/tailcall-modref.ll
new file mode 100644
index 0000000000..c58ad7ffcd
--- /dev/null
+++ b/test/Analysis/BasicAA/tailcall-modref.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
+declare void %foo(int*)
+declare void %bar()
+
+int %test() {
+ %A = alloca int
+ call void %foo(int* %A)
+
+ %X = load int* %A
+ tail call void %bar() ;; Cannot modify *%A because it's on the stack.
+ %Y = load int* %A
+ %Z = sub int %X, %Y
+ ret int %Z
+}
+
+