repo.or.cz
/
llvm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix a globalopt crash on two Adobe-C++ testcases that the recent
[llvm.git]
/
test
/
Transforms
/
GVN
/
rle-nonlocal.ll
blob
6b74e9a946d16ccedb09335fed1bb186673370d8
1
; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
2
3
define i32 @main(i32** %p) {
4
block1:
5
br i1 true, label %block2, label %block3
6
7
block2:
8
%a = load i32** %p
9
br label %block4
10
11
block3:
12
%b = load i32** %p
13
br label %block4
14
15
block4:
16
; CHECK-NOT: %existingPHI = phi
17
; CHECK: %DEAD = phi
18
%existingPHI = phi i32* [ %a, %block2 ], [ %b, %block3 ]
19
%DEAD = load i32** %p
20
%c = load i32* %DEAD
21
%d = load i32* %existingPHI
22
%e = add i32 %c, %d
23
ret i32 %e
24
}