blob: 9d447d91000666eb28699d5be3ac0711a7a2785d [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine |\
2; RUN: llvm-dis | grep {ret i32 0}
3declare void %foo(int*)
4declare void %bar()
5
6int %test() {
7 %A = alloca int
8 call void %foo(int* %A)
9
10 %X = load int* %A
11 tail call void %bar() ;; Cannot modify *%A because it's on the stack.
12 %Y = load int* %A
13 %Z = sub int %X, %Y
14 ret int %Z
15}
16
17