projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Filter loops that subtract induction variables.
[oota-llvm.git]
/
test
/
Transforms
/
ArgumentPromotion
/
basictest.ll
1
; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion -mem2reg | llvm-dis | not grep alloca
2
3
implementation
4
5
internal int %test(int *%X, int* %Y) {
6
%A = load int* %X
7
%B = load int* %Y
8
%C = add int %A, %B
9
ret int %C
10
}
11
12
internal int %caller(int* %B) {
13
%A = alloca int
14
store int 1, int* %A
15
%C = call int %test(int* %A, int* %B)
16
ret int %C
17
}
18
19
int %callercaller() {
20
%B = alloca int
21
store int 2, int* %B
22
%X = call int %caller(int* %B)
23
ret int %X
24
}