1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/Analysis/BasicAA/tailcall-modref.ll
Reid Spencer 6ac77d03a8 Convert test cases to new llvm.exp version of llvm_runtest and fix tests
that it found to be broken.

llvm-svn: 36009
2007-04-14 19:27:03 +00:00

18 lines
368 B
LLVM

; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine |\
; RUN: llvm-dis | grep {ret i32 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
}