New testacse for information exposed by the 'tail' call marker.

llvm-svn: 21795
This commit is contained in:
Chris Lattner 2005-05-08 23:57:34 +00:00
parent 2ad5aa8334
commit af008dcdd1
1 changed files with 16 additions and 0 deletions

View File

@ -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
}