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
[ThinLTO] Add code comment. NFC
[llvm-complete.git]
/
test
/
Transforms
/
GVNHoist
/
hoist-more-than-two-branches.ll
blob
58864ad4e3fc239dd1a6a6b6fafce1e22f7e0df0
1
; RUN: opt -gvn-hoist -S < %s | FileCheck %s
2
3
; CHECK: store
4
; CHECK-NOT: store
5
6
; Check that an instruction can be hoisted to a basic block
7
; with more than two successors.
8
9
@G = external global i32, align 4
10
11
define void @foo(i32 %c1) {
12
entry:
13
switch i32 %c1, label %exit1 [
14
i32 0, label %sw0
15
i32 1, label %sw1
16
]
17
18
sw0:
19
store i32 1, i32* @G
20
br label %exit
21
22
sw1:
23
store i32 1, i32* @G
24
br label %exit
25
26
exit1:
27
store i32 1, i32* @G
28
ret void
29
exit:
30
ret void
31
}