From d1969cf8c2ebfd32b40c5cee5ef2b760f8448ea8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 8 May 2005 23:57:34 +0000 Subject: [PATCH] New testacse for information exposed by the 'tail' call marker. llvm-svn: 21795 --- .../Analysis/BasicAA/tailcall-modref.ll | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/Regression/Analysis/BasicAA/tailcall-modref.ll diff --git a/test/Regression/Analysis/BasicAA/tailcall-modref.ll b/test/Regression/Analysis/BasicAA/tailcall-modref.ll new file mode 100644 index 00000000000..c58ad7ffcd4 --- /dev/null +++ b/test/Regression/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 +} + +