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
Fix bugs section.
[llvm-complete.git]
/
test
/
Analysis
/
LoadVN
/
RLE-Preserve.ll
blob
e08c41ceeb8b2b22b029ce56706cae54aa20e711
1
; This testcase ensures that redundant loads are preserved when they are not
2
; allowed to be eliminated.
3
; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | grep sub
4
;
5
int %test1(int* %P) {
6
%A = load int* %P
7
store int 1, int* %P
8
%B = load int* %P
9
%C = sub int %A, %B
10
ret int %C
11
}
12
13
int %test2(int* %P) {
14
%A = load int* %P
15
br label %BB2
16
BB2:
17
store int 5, int* %P
18
br label %BB3
19
BB3:
20
%B = load int* %P
21
%C = sub int %A, %B
22
ret int %C
23
}
24
25