blob: 7fbddd769f512fa19b7234c0e48d54f4b7aa8c53 [file] [log] [blame]
Reid Spencer69ccadd2006-12-02 04:23:10 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
Chris Lattner20fad442005-05-08 23:57:34 +00002declare void %foo(int*)
3declare void %bar()
4
5int %test() {
6 %A = alloca int
7 call void %foo(int* %A)
8
9 %X = load int* %A
10 tail call void %bar() ;; Cannot modify *%A because it's on the stack.
11 %Y = load int* %A
12 %Z = sub int %X, %Y
13 ret int %Z
14}
15
16