From: Chris Lattner Date: Sun, 8 May 2005 23:57:34 +0000 (+0000) Subject: New testacse for information exposed by the 'tail' call marker. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=20fad44ede55d9996a7d8a8f9012b763d7b7c601;p=oota-llvm.git 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 --- diff --git a/test/Analysis/BasicAA/tailcall-modref.ll b/test/Analysis/BasicAA/tailcall-modref.ll new file mode 100644 index 00000000000..c58ad7ffcd4 --- /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 +} + +