repo.or.cz
/
llvm
/
avr.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix PR4963: folding insertvalue would sometimes turn a packed struct into
[llvm/avr.git]
/
test
/
Transforms
/
GVN
/
load-constant-mem.ll
blob
87f33eaadadb1f5fe763e0911ebbd14e45190aa7
1
; RUN: opt < %s -gvn -instcombine -S | grep {ret i32 0}
2
; PR4189
3
@G = external constant [4 x i32]
4
5
define i32 @test(i8* %p, i32 %i) nounwind {
6
entry:
7
%P = getelementptr [4 x i32]* @G, i32 0, i32 %i
8
%A = load i32* %P
9
store i8 4, i8* %p
10
%B = load i32* %P
11
%C = sub i32 %A, %B
12
ret i32 %C
13
}