repo.or.cz
/
llvm-complete.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add and use DominatorTreeBase::findNearestCommonDominator().
[llvm-complete.git]
/
test
/
Analysis
/
BasicAA
/
tailcall-modref.ll
blob
9d447d91000666eb28699d5be3ac0711a7a2785d
1
; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine |\
2
; RUN: llvm-dis | grep {ret i32 0}
3
declare void %foo(int*)
4
declare void %bar()
5
6
int %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